Timeline for Using jq within pipe chain produces no output
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 29, 2023 at 15:23 | comment | added | Stéphane Chazelas | Beware unbuffer -p is severely broken, see Why does unbuffer -p mangle its input? (includes a work around) | |
| Apr 5, 2018 at 7:06 | comment | added | Heath Raftery | While expect is pre-installed on macos, unbuffer is not. However it is part of the Homebrew package, so on macos, brew install expect will do. | |
| Apr 4, 2018 at 12:22 | comment | added | grawity | Protip, GNU coreutils come with stdbuf -o0 which will inject code via LD_PRELOAD and do the setvbuf() magic call for you. Whether it works on macOS, I'm not sure. | |
| Apr 4, 2018 at 7:28 | comment | added | filbranden | Ah very nice! I started looking in the jq man page but got bored after a while and went to do other stuff... Good to know there's something like that! :-) | |
| Apr 4, 2018 at 7:16 | comment | added | David Z | I like that you've explained why the observed behavior occurs, but as Kusalananda pointed out, jq natively implements unbuffered output so there's no need for the workaround. | |
| Apr 4, 2018 at 4:47 | history | answered | filbranden | CC BY-SA 3.0 |