From owner-freebsd-questions@FreeBSD.ORG Thu Aug 12 10:49:22 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 4330110656AC for ; Thu, 12 Aug 2010 10:49:22 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C2ABB8FC12 for ; Thu, 12 Aug 2010 10:49:21 +0000 (UTC) Received: by bwz9 with SMTP id 9so987912bwz.13 for ; Thu, 12 Aug 2010 03:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=dHfX8rVu6ogmaGs54+tuJ8aBNbiuf1WD0BaOdyhCcfE=; b=IfRUnHXx0EBf25Oe/z6ABs8OIdfmoo5KwciFNwVQcFzvzuQOCICAdge71KKp9oR74w Ri+nx2o7eu8ogk6h5HZSzdwaDKFXWeJU2Vz14PWXH4sJF7sW6KycCiN2Ob6csX1imtHL Yk4cGizD68kThnSebCq0n3Bj3EjVv+fuu6IAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=NncPbU4OkqJnhb/lqoHkvm1Dq2pRDPylcAZ9njMADVEmkwPXx2BiH45vxfB781mAOH Tj0KcC6nMF7CJISnDvHgB34wR7nE0MT/A0pAjieQZ4IeReBVSBWo4KLDEAQurXvHlZwd CPrc3NFd+2hTB14ClrBKMIQep+SLIH2hSpwgc= Received: by 10.204.175.3 with SMTP id v3mr529316bkz.49.1281610160694; Thu, 12 Aug 2010 03:49:20 -0700 (PDT) Received: from localhost ([81.218.219.122]) by mx.google.com with ESMTPS id y19sm941048bkw.18.2010.08.12.03.49.13 (version=SSLv3 cipher=RC4-MD5); Thu, 12 Aug 2010 03:49:19 -0700 (PDT) From: Anonymous To: "Jack L. Stone" References: <3.0.1.32.20100811180022.00ee4250@sage-american.com> Date: Thu, 12 Aug 2010 14:48:58 +0400 In-Reply-To: <3.0.1.32.20100811180022.00ee4250@sage-american.com> (Jack L. Stone's message of "Wed, 11 Aug 2010 18:00:22 -0500") Message-ID: <86lj8cds2t.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org 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:49:22 -0000 "Jack L. Stone" writes: > 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. Perhaps, `-e' option? $ printf 'foo\nbar\n' | fgrep -e foo -e bar foo bar