look for line from FILE1 at FILE2

view full story

http://www.unix.com – Hi guys! I'm trying to write something to find each line of file1 into file2, if line is found return YES, if not found return NO. The result can be written to a new file. Can you please help me out? FILE1 INPUT: WATER CAR SNAKE (in reality this file has about 600 lines each with a different word) FILE2 INPUT: A B C ABC.WATER.DEF D ABC.CAR.DEF If I ran this script on above files it would return something similar to this in new file: WATER YES CAR. YES SNAKE NO Thanks a lot! (HowTos)