Grepping a list of words
Daniel Bye
freebsd-questions at slightlystrange.org
Thu Aug 12 10:40:49 UTC 2010
On Wed, Aug 11, 2010 at 06:00:22PM -0500, Jack L. Stone 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.
Something like this should do the trick:
egrep "(word1|word2|word3)" file
Dan
--
Daniel Bye
_
ASCII ribbon campaign ( )
- against HTML, vCards and X
- proprietary attachments in e-mail / \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100812/f1dc9df9/attachment.pgp
More information about the freebsd-questions
mailing list