> From owner-freebsd-questi...@freebsd.org Thu Aug 12 05:36:27 2010 > Date: Wed, 11 Aug 2010 18:00:22 -0500 > To: freebsd-questions@freebsd.org > From: "Jack L. Stone" <ja...@sage-american.com> > Subject: Grepping a list of words > > 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. > > Thanks for any suggestions... >
1) egrep "(word1|word2|word3|word4|....|wordN)" file 2) grep -F -f wordlist_file sourcefile The proverbial advice about "the fine manpage" is relevant. :) ` _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"