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

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -