From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 10:47:19 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12771065693 for ; Thu, 12 Aug 2010 10:47:19 +0000 (UTC) (envelope-from dickey@saltmine.radix.net) Received: from saltmine.radix.net (saltmine.radix.net [207.192.128.40]) by mx1.freebsd.org (Postfix) with ESMTP id 8129C8FC18 for ; Thu, 12 Aug 2010 10:47:19 +0000 (UTC) Received: from saltmine.radix.net (localhost [127.0.0.1]) by saltmine.radix.net (8.12.2/8.12.2) with ESMTP id o7CAlISa026260; Thu, 12 Aug 2010 06:47:18 -0400 (EDT) Received: (from dickey@localhost) by saltmine.radix.net (8.12.2/8.12.2/Submit) id o7CAlIYn026258; Thu, 12 Aug 2010 06:47:18 -0400 (EDT) Date: Thu, 12 Aug 2010 06:47:18 -0400 From: Thomas Dickey To: freebsd-questions@freebsd.org Message-ID: <20100812104717.GA26090@saltmine.radix.net> References: <3.0.1.32.20100811180022.00ee4250@sage-american.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <3.0.1.32.20100811180022.00ee4250@sage-american.com> User-Agent: Mutt/1.3.27i Cc: "Jack L. Stone" Subject: Re: Grepping a list of words X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2010 10:47:19 -0000 --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--