Grepping a list of words
Thomas Dickey
dickey at radix.net
Thu Aug 12 10:47:19 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.
put the list in a file, and use grep -f
better, use the \< and \> markers on the file's contents and use egrep.
(grep -w option is likely to be buggy when available).
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100812/920e177e/attachment.pgp
More information about the freebsd-questions
mailing list