Which do you do? Be honest.

Please boost :)

I'll be honest, 99% of the time I run cat file | grep string

@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

@Secstodon haha, me too

btw, did you get a notification when this ended?

Sign in to participate in the conversation
Mastodon for Tech Folks

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!