Write output to a file after piped to jq
Just calling jq without a filter will throw errors if stdout isn’t a terminal $ curl https://jsonplaceholder.typicode.com/posts/1 | jq > test.txt jq – commandline JSON processor [version 1.5-1-a5b5cbe] Usage: jq [options] <jq filter> [file…] jq is a tool for processing JSON inputs, applying the given filter to its JSON text inputs and producing the […] … Read more