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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of pipes

pipes

Related news:

News photo

Node.js, Pipes, and Disappearing Bytes

News photo

Show HN: Pipet – CLI tool for scraping and extracting data online, with pipes

News photo

Why it takes NYC nearly 10 years to install 500 feet of pipes – Gothamist