Re:Everything you ever wanted to know about terminals (2018)
by inetknght on Thursday September 10, 2020 @09:02PM
(#24438167)
Yup! I had the same problem too. It was 'fixed' in jq 1.6, such that it now assumes `.` is the filter if no program arguments are provided [0].
It happens all the time with anything systemd or networkmanager too
> $ echo "{}" | jq > {} > $ echo "{}" | jq > out.json > jq - commandline JSON processor [version 1.5-1-a5b5cbe] ... etc ...
Turns out when stdout isn't a tty you _must_ specify a filter (in this case '.')