Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a tcpdump command:

tcpdump -i wlan0 dst port 80 and ! dst and ! src -vvv -s0 -w proba.txt

Which gives the following output:

root@SERVER:/tmp# egrep "GET|Host:" proba.txt | awk 'BEGIN {FS=" "}{print $2}'

How can I modify these lines to get this output?:

Is it possible?

share|improve this question

2 Answers 2

You might want to look into tcpflow instead, it decodes the protocol and produces human readable text streams. By default they go to a file but the -c flag prints it on the console. tcpflow is one of my favorite hidden gems.

share|improve this answer

You pipe the output of your parsing command though sed - like this:

 egrep "GET|Host:" proba.txt | awk 'BEGIN {FS=" "}{print $2}' | sed ':a;N;$!ba;s/\n\//\//g'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.