Conversation
jq accepts filename(s) as arguments(s) making the pipe from cat superfluous.
1
1
Or maybe you use an old version which didn't, in which case I shut up
1
jq doesn't read compressed files directly - so one advantage of piping in is you can read from super compressed files like:
zstd -d big.zstd | jq --stream ...
1
1
Indeed, but Jason's example isn't of a compressed file.
One could also pass the decompressed stream as an arg using $(zstd -d file.zst) or even backticks I suppose
3
1
I used cat to show an example of piping it in (since most people will decompress and pipe straight from compressed files).
It is superfluous but it was mainly used to illustrate how to accept input from something through pipes.


