sudo tshark -i ppp0 'tcp port 80 \
and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' \
-R'http.request.method == "GET" && http.request.uri contains "/ABC/XYZ"' \
-T fields -e http.host -e http.request.uri
I am using the above lines of tshark filtering the output based on /ABC/XYZ. it outputs dynamically random data for example like where i find duplicate lines example :
1bcdJOSHhijklmnopqrstuvwxyz
1bcdefghijklmnopqrstuvwxyz
1bcdefghijklmnopqrstuvwxyz
3bcdefghijklmnopqrstuvwxyz
2bcdefghijklmnopqrstuvwxyz
1bcdJOSHhijklmnopqrstuvwxyz
3bcdefghijklmnopqrstuvwxyz
Is there any way to remove the duplicates without creating any file may be using some kind of buffer or pipe.
or can tshark itself do it
EDIT : I am not sure why but i get what i want after i prefix tshark with stdbuf -o L
as suggested by meuh