Skip to content

Instantly share code, notes, and snippets.

@mallamanis
Last active May 16, 2019 09:14
Show Gist options
  • Save mallamanis/951e3287fff35263696850c5b62d7715 to your computer and use it in GitHub Desktop.
Save mallamanis/951e3287fff35263696850c5b62d7715 to your computer and use it in GitHub Desktop.
Read json[l] files
function zjson {
zcat $1 | python3 -m json.tool | less
}
function zjsonl {
zcat $1 | while read -r l; do
echo $l | python3 -m json.tool
echo '--------------------------------------------------'
done | less
}
function jsonl {
cat $1 | while read -r l; do
echo $l | python3 -m json.tool
echo '--------------------------------------------------'
done | less
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment