Created
May 17, 2018 14:06
-
-
Save wheelerlaw/34eb14cc6993d9dd4ae876586d143797 to your computer and use it in GitHub Desktop.
A very simple executable script to convert a YAML text stream to a JSON one.
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
#!/bin/sh | |
python3 -c ' | |
import sys, yaml, json | |
try: json.dump(yaml.load(sys.stdin), sys.stdout, indent=4) | |
except KeyboardInterrupt as e: print("Interrupted. Quitting..."); sys.exit(130) | |
' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment