ubuntu - Processing list of files and correctly naming the output files -


i'm using following command line on ubuntu try , work through list of tshark cap files , produce summary file separated. works fine. problem right @ end

sudo ls /capcopy/dump*.cap -l |awk '(nr>0) {print $9}'| xargs -i {} sudo tshark -n -r {} -t fields -e separator=$ -e quote=n -e header=n -e wlan.sa -e radiotap.dbm_antsignal -e  frame.time > /capcopy/dollarsep{} 

the last element intended prepend characters dollarsep onto file name source. in same way in tshark element.

i can see doesn't work , creates file name dollarsep{}

is there way pass source file name forward can need?

thanks

change last command in pipeline to

xargs -i {} sudo bash -c 'tshark -n -r {} ... > /capcopy/dollarsep{}' 

Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -