Created
September 30, 2020 20:10
-
-
Save pwillis-els/918dd116fc9aab40f6298346e1137a5f to your computer and use it in GitHub Desktop.
Python one-liner to print out the values of keys specified as command-line arguments
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
#!/bin/sh | |
python -c 'import sys,json;j=json.load(sys.stdin); a=sys.argv[1:]; print("\n".join([j[k] for k in a]))' "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment