3 ms·
That's not a typical usage of grep and nor is it even the first instruction in the man page. Let's actually take a look at the man page shall we: Synopsis
by laumars 8y ago
That's not a typical usage of grep and nor is it even the first instruction in the man page.
Let's actually take a look at the man page shall we:
Synopsis
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
That first line is more or less exactly what I posted, is your typical usage of grep, and is very easy to learn.
Sure, you can list of esoteric examples of grep usage but that's besides the point if it's not how people would typically use grep (in my ~25 years of command line usage, I can't even remember one occasion when I've needed `-f` - not saying it hasn't happened but it certainly isn't something I've needed regularly)