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

People like cat because it allows notating the command closer to how they think. How can I pipe while putting the file first?
Well, just do it:

    < unformatted.json python -mjson.tool | vim -
What's the immediate advantage for me in using a less intuitive syntax? I understand cat is meant to concatenate files, so what?