Hacker News new | ask | show | jobs
by dghf 3039 days ago
> cat contract.txt | grep -i "indemnify" | wc

I hate to be that guy, but you have a Useless Use of Cat[0] there.

[0] http://porkmail.org/era/unix/award.html#cat

1 comments

Sure. grep could take the file. I knew that when I wrote the above line. We could have a nice debate about readability and maintainability, compositional design over compact expression, etc. But that's kind of over-kill for a joke, eh?