Skip to content

Instantly share code, notes, and snippets.

@xbalaji
Last active October 10, 2022 04:03
Show Gist options
  • Save xbalaji/2e4cf84beb24a451d7641e4ade0e2355 to your computer and use it in GitHub Desktop.
Save xbalaji/2e4cf84beb24a451d7641e4ade0e2355 to your computer and use it in GitHub Desktop.
json2yml one liner
# oneliners-json2yml.sh
cat "json-file" | python -c 'import sys,yaml; yaml.dump(yaml.safe_load(sys.stdin),sys.stdout)'
python -c 'import sys,yaml; yaml.dump(yaml.safe_load(sys.stdin),sys.stdout)' < "json-file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment