How to grep with a list of words -
i have file 100 words in separated new lines. search file b see if of words in file occur in it.
i tried following not work me:
grep -f b
you need use option -f
:
$ grep -f b
the option -f
fixed string search -f
specifying file of patterns. may want both if file contains fixed strings , not regexps.
$ grep -ff b
you may want -w
option matching whole words only:
$ grep -wff b
read man grep
description of possible arguments , do.
Comments
Post a Comment