Timeline for How to turn off stdout buffering in a pipe?
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 14, 2023 at 3:12 | comment | added | evadeflow |
Well... the other commenters aren't wrong, but I'm glad you mentioned jq's --unbuffered flag. I've just been trying to pipe the output of mosquitto_sub to jq in a Git Bash terminal. I'm troubleshooting a hardware problem, and I need a 'live' readout of a few values. The messages that get splatted to the terminal are too big to see clearly, so I wanted to filter them using jq, got bit by this exact same buffering behavior. Using jq --unbuffered solved it neatly, thank you!
|
|
| Feb 17, 2022 at 16:04 | comment | added | amphetamachine |
I don't see where OP mentions using jq.
|
|
| Jun 19, 2020 at 9:12 | comment | added | Aaron Digulla | A lot of tools have options like this but my question is really about how to fix that for any tool. I guess I'll have to file a feature request to GLIBC. | |
| Jun 14, 2020 at 2:13 | history | answered | seeker_of_bacon | CC BY-SA 4.0 |