Skip to content

Comment on Easy CLI JSON Formatting

Comments

Here is the bash alias I have been using for CLI JSON formatting, and as a bonus, my random password generator:

alias jsonpp='ruby -r json -e '\''puts JSON.pretty_generate(JSON.parse(STDIN.read))'\'''

alias md5pass='dd if=/dev/random bs=100 count=1 2>/dev/null | md5'

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.