Y
Hacker News
new
|
ask
|
show
|
jobs
by
ferrari8608
3632 days ago
It's not nice to abuse innocent cats.
python -mjson.tool < unformatted.json | vim -
If you're not using cat to concatenate things, the shell can probably handle the job.
2 comments
HappyTypist
3632 days ago
People like cat because it allows notating the command closer to how they think. How can I pipe while putting the file first?
link
yoha
3631 days ago
Well, just do it:
< unformatted.json python -mjson.tool | vim -
link
thiht
3631 days ago
What's the immediate advantage for me in using a less intuitive syntax? I understand cat is meant to concatenate files, so what?
link