Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing tcpdump buffering when piping output

Status
Not open for further replies.

paulobrads

Programmer
Jul 13, 2006
28
GB
I'm piping the output of tcpdump to an awk command. Something like this:

Code:
tcpdump -i eth0 | awk'{print $1}'

Tcpdump seems to buffer output until quite a bit of data is received which is then all dumped to output in one load. Can this be removed to allow real time processing and printing of stuff piped out?

Cheers.
 
tcpdump -i eth0 [!]-l[/!] | awk'{print $1}'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yeah, thanks for that but already tried that but doesn't seem to make any difference.

Any other ideas?
 
Actually - that does work if I also fflush the input to the awk.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top