lookfor matching strings between 2 files

P

papori

Guest
Hi all,
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?

Thanks,
Pap
 


N

nixsavy

Guest
I'm sure about what you want but for compare contents of two files you can use sdiff command as below:

Code:
sdiff file1 file2
 


Staff online

Members online



Top