Skip to content

Instantly share code, notes, and snippets.

@evandbrown
Last active August 29, 2015 14:23
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 evandbrown/d4ebdd62d7d57fc291da to your computer and use it in GitHub Desktop.
Save evandbrown/d4ebdd62d7d57fc291da to your computer and use it in GitHub Desktop.
Convert all JSON to YAML
ls *.json | \
sed -e 's/\.json//' | \
while read x; do \
ruby -ryaml -rjson -e 'puts YAML.dump(JSON.parse(STDIN.read))' < $x.json > $x.yaml; \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment