Skip to content

Instantly share code, notes, and snippets.

@caprica
Last active October 6, 2021 18:26
Show Gist options
  • Save caprica/cb6bc61ac0bd853e9c76b1c7d95b8ba9 to your computer and use it in GitHub Desktop.
Save caprica/cb6bc61ac0bd853e9c76b1c7d95b8ba9 to your computer and use it in GitHub Desktop.
Example using "jq" to pretty print JSON, displayed in "less", preserving colour codes
# Example using "jq" to pretty print JSON, displayed in less, preserving colour codes
curl -s http://localhost:8080/api/transfer/export | jq -C . | less -R
# Example using "gunzip", using "-c" with gunzip to keep the original file
gunzip -c filename.json/gz | jq -C . | less -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment