Date: Thu, 12 Aug 2010 06:47:18 -0400 From: Thomas Dickey <dickey@radix.net> To: freebsd-questions@freebsd.org Cc: "Jack L. Stone" <jacks@sage-american.com> Subject: Re: Grepping a list of words Message-ID: <20100812104717.GA26090@saltmine.radix.net> 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
--SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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). --=20 Thomas E. Dickey http://invisible-island.net ftp://invisible-island.net --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (SunOS) Comment: For info see http://www.gnupg.org iD8DBQFMY9E0tIqByHxlDocRAk0SAJ97fYGdAzAtZVX/tlCWhVKw5gHm/wCdFjzw hKAL6ioGQvjHekmWNtHIWCA= =yINf -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100812104717.GA26090>