Date: Thu, 12 Aug 2010 11:40:48 +0100 From: Daniel Bye <freebsd-questions@slightlystrange.org> To: freebsd-questions@freebsd.org Subject: Re: Grepping a list of words Message-ID: <20100812104048.GA46142@catflap.slightlystrange.org> In-Reply-To: <3.0.1.32.20100811180022.00ee4250@sage-american.com> References: <3.0.1.32.20100811180022.00ee4250@sage-american.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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 / \
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
iEYEARECAAYFAkxjz7AACgkQixf5fBYiFmqW5ACghMLJtHfxowUXRHKQXb0D6dOH
2FgAoJAi+zsjUklZzu56K5Mug4n7BuBn
=j0rC
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100812104048.GA46142>
