Grepping a list of words

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

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

More information about the freebsd-questions mailing list