Created
August 7, 2016 18:59
-
-
Save dalejung/2a85ed64c8db66b3533e79f3b2b2ca43 to your computer and use it in GitHub Desktop.
json.sh
This file contains 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 tempjson() { | |
temp_file=$(mktemp) | |
while read -r LINE; do | |
echo $LINE >> "$temp_file" | |
done | |
export _temp_json=$temp_file | |
} | |
alias jcli="tempjson && ipython -i -c \"import json, os; f = open(os.environ['_temp_json']); data = json.load(f); f.close()\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment