Skip to content

Instantly share code, notes, and snippets.

@gabereiser
Created October 11, 2016 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabereiser/0edd26e388ab51fe49e4819088ab27c3 to your computer and use it in GitHub Desktop.
Save gabereiser/0edd26e388ab51fe49e4819088ab27c3 to your computer and use it in GitHub Desktop.
JSON to YAML
for FILE in $(find . -type f -name \*.template.yml) ; do
NEW_FILE=${FILE::${#FILE}-4}
python -c 'import sys, yaml, json; yaml.dump(json.load(sys.stdin), sys.stdout, indent=4)' < $FILE > $NEW_FILE
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment