3 ms·
Nice! You can set up the following aliases in ~/.zshrc (or ~/.bashrc): alias json="python -mjson.tool" alias xml="xmllint --format -" then pipe into them
by georgecalm 15y ago
Nice!
You can set up the following aliases in ~/.zshrc (or ~/.bashrc):
alias json="python -mjson.tool"
alias xml="xmllint --format -"
then pipe into them like so:
echo '{"one": 1}' | json
echo "<one>1</one>" | xml