Created
February 22, 2013 15:13
-
-
Save drocamor/5014102 to your computer and use it in GitHub Desktop.
Uses Python to clean up JSON
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
#!/bin/bash | |
TMPFILE=`mktemp /tmp/prettyjson.XXXXXX` || exit 1 | |
python -mjson.tool $1 > $TMPFILE || exit 1 | |
mv $TMPFILE $1 || exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I added this line to my ~/.bashrc file so I can use this script anywhere :