Created
September 11, 2023 10:59
-
-
Save geblanco/fcaf0a2d37f021cb04cce1c779cbd3f7 to your computer and use it in GitHub Desktop.
Dump received arguments to json
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/python3 | |
import sys | |
import json | |
data = sys.stdin.readlines() | |
args = [] | |
for line in data: | |
line = line.replace("\\", "").strip().split(" ") | |
args.extend(line) | |
print(json.dumps(args, indent=2) + "\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment