@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 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
This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!