Hacker News new | ask | show | jobs
by snag 1225 days ago
> cat beef.txt | grep "lasagna"

What's wrong with

> grep "lasagna" beef.txt

?

2 comments

sort also has -u, so there's two unnecessary pipes. The whole thing could be written:

  grep lasagna beef.txt | sort -u
Some people add extra pipes and cat for what they claim is readability. I don't agree that cat and extra pipes is more readable, but to each their own.
It has a similar learning curve, but less functionality