@farhan it's more coherent and unixy that way
@farhan grep file -e pattern
@farhan There are uses for both. cat | grep when finding out what is the best pipeline for processing a file (usually, more than just grep comes after). grep directly when performance optimization is needed.
@farhan In interactive use, I often start my pipeline with a cat and iteratively build it up from there.
@farhan usually the latter, but if I was using cat in the last command, there's a high chance I'll do the former
@farhan For what it's worth, it took me like 2 months to get the hang of it.
@farhan honestly it's about 50/50. i grep pattern file more often when globbing or running a recursive grep, but for single files i tend to unthinkingly cat to grep
@farhan i love using pipes, but since i discovered the correct way to use grep, i'm using it that way
@farhan nooooo I lost 😥😂
@Secstodon haha, me too
btw, did you get a notification when this ended?
@farhan I did
@farhan alsohttp://porkmail.org/era/unix/award.html
@Secstodon HAHAHA that's awesome :)
@farhan my weakness is the use of file | grep term...
I'll be honest, 99% of the time I run cat file | grep string