HOW-TO Extract Lines from File A that Contains Words in File B?
#5
The program you need was written like 60 years ago and it's free.

grep -Ff B.txt A.txt > C.txt

EDIT: This is better:

grep -wFf B.txt A.txt > C.txt

(And to make it case insensitive, use -iwFf)


Messages In This Thread
RE: HOW-TO Extract Lines from File A that Contains Words in File B? - by magnum - 01-05-2015, 02:53 AM