Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Aug 2010 14:48:58 +0400
From:      Anonymous <swell.k@gmail.com>
To:        "Jack L. Stone" <jacks@sage-american.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Grepping a list of words
Message-ID:  <86lj8cds2t.fsf@gmail.com>
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")
References:  <3.0.1.32.20100811180022.00ee4250@sage-american.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Jack L. Stone" <jacks@sage-american.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86lj8cds2t.fsf>