Get the latest tech news
Why pipes sometimes get "stuck": buffering
Why pipes sometimes get "stuck": buffering
grep (--line-buffered) sed (-u) awk (there’s a fflush() function) tcpdump (-l) jq (-u) tr (-u) cut (can’t disable buffering) In a magical perfect world, what I would want to happen is for tcpdump to flush its buffer, grep would search for example.com, and I would see all the output I missed. Unlike stdbuf it will always work, though it might have unwanted side effects, for example grep thing1 ’s will also colour matches.
Or read this on Hacker News