Created
June 29, 2017 14:54
-
-
Save jworl/ec243a1ea2814e8c02495df552e2cda4 to your computer and use it in GitHub Desktop.
yaml2json function within bash
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
# requires PyYAML | |
_YAML2JSON(){ | |
python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment