This is our old Q&A Site. Please post any new questions and answers at

Hi everyone,

I am monitoring wifi traffic and want to process every output line in real time.

Monitoring works:

sudo tshark -i mon0 subtype probereq

Saving to a file works:

sudo tshark -i mon0 subtype probereq > pcap.log

Piping file for processing works:

cat pcap.log | while read -r line; do echo "$line"; done

But piping thark output directly just doesn't work:

sudo tshark -i mon0 subtype probereq | while read -r line; do echo "$line"; done

What's the problem? How can I process every line of tshark output in real time?

Cheers bluepuma

asked 25 Nov '13, 10:56

bluepuma's gravatar image

accept rate: 0%

tshark output is buffered. Please use tshark option -l, if you want tshark to flush STDOUT after every packet.


permanent link

answered 25 Nov '13, 11:04

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
accept rate: 15%

Thanks, that was easy

(25 Nov '13, 11:49) bluepuma
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 25 Nov '13, 10:56

question was seen: 12,553 times

last updated: 25 Nov '13, 11:49

p​o​w​e​r​e​d by O​S​Q​A