lookfor matching strings between 2 files
I have a basic procedure that i want to create..
Assuming that I have 2 files.
In each file i have list of 30 words.
i want to lookfor the first word in list 1, if it found also in list 2.
if it is, keep the line number in file.
if not, keep the word in different file.
Any idea on short/easy solution?