News for hackers. Stuff that matters.
Re:Everything you ever wanted to know about terminals (2018) by anitil on Thursday September 10, 2020 @08:51PM (#24438125)
Gah i got bit by this with 'jq'!

> $ 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 '.')

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

[0]: https://github.com/stedolan/jq/releases/tag/jq-1.6