Hacker News new | ask | show | jobs
by jve 1461 days ago
> avoiding the "cat pipe" pattern

For me, `cat | grep/sort` is easier to remember as it follows some unixy philosophy on how to do things.

I wonder why that article author is so obsessed with putting down cat/pipe. Maybe in scripts where you process large files and sort/grep it is less ineffective. But when writing shell commands, I see this as an empty argument to retrain my "muscle memory" and learn "different syntax".

In fact, when writing powershell I do the same: `gc something | sls something`. But I know it is less effective, but I'm lazy to look up proper syntax: `sls ?? something` - But if I ever will need that in a script to process non trivial amount of files-lines - I'll look it up.

1 comments

Along those lines it's interchangeable with other sources like nc or ssh or whatever, with no changes to sort/grep.