Last active
May 16, 2019 09:14
-
-
Save mallamanis/951e3287fff35263696850c5b62d7715 to your computer and use it in GitHub Desktop.
Read json[l] files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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