Skip to content

Instantly share code, notes, and snippets.

@Exceen
Exceen / json2yaml.sh
Created August 11, 2018 20:11 — forked from sbp/json2yaml.sh
Convert JSON to YAML
#!/bin/sh
export PYTHONPATH=$HOME/usr/opt/pyyaml/lib/python2.6/site-packages
python -c '
import sys, json, yaml
with open(sys.argv[1]) as f:
print yaml.safe_dump(json.load(f), default_flow_style=False)
' $@