Grepping a list of words

Rodrigo Gonzalez rjgonzale at
Thu Aug 12 11:20:19 UTC 2010

On Wed, 11 Aug 2010 18:00:22 -0500
"Jack L. Stone" <jacks at> 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 :

More information about the freebsd-questions mailing list