Using variables in tshark filter in shell script -


i'm trying write shell script applies tshark filter on pcap file. filter variable characters '/'.

i have like

tshark -r $file -y "frame contains $pattern"

which works filters without '/'. once $pattern contains '/', there error saying tshark: '/' unexpected.

how write script such variable pattern can contain special characters?

try quoting pattern, example:

tshark -r $file -y 'frame contains "$pattern"' 

on windows, use:

tshark.exe -r $file -y "frame contains \"$pattern\"" 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -