Grepping a list of words

Anonymous swell.k at gmail.com
Thu Aug 12 10:49:22 UTC 2010


"Jack L. Stone" <jacks at 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


More information about the freebsd-questions mailing list