Grepping a list of words

Rodrigo Gonzalez rjgonzale at estrads.com.ar
Thu Aug 12 11:20:19 UTC 2010


On Wed, 11 Aug 2010 18:00:22 -0500
"Jack L. Stone" <jacks at sage-american.com> wrote:

> 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.
> 

Use egrep

egrep "(word1|word2)" <file>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100812/5ebb9708/signature.pgp


More information about the freebsd-questions mailing list