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
Post a Comment