Grepping a list of words
Robert Bonomi
bonomi at mail.r-bonomi.com
Sat Aug 14 19:58:19 UTC 2010
> From owner-freebsd-questions at freebsd.org Thu Aug 12 05:36:27 2010
> Date: Wed, 11 Aug 2010 18:00:22 -0500
> To: freebsd-questions at freebsd.org
> From: "Jack L. Stone" <jacks at sage-american.com>
> Subject: Grepping a list of words
>
> Kindly appreciate help with how to grep (or similar) a list of words to
> determine if any of them are in a file rather than grepping one word at a
> time.
>
> Thanks for any suggestions...
>
1) egrep "(word1|word2|word3|word4|....|wordN)" file
2) grep -F -f wordlist_file sourcefile
The proverbial advice about "the fine manpage" is relevant. :)
`
More information about the freebsd-questions
mailing list