• Rob's side project: I recently started Gun-Forums.com and we currently have a $100 raffle - if you're into guns, join up and enter the raffle to win $100.00. Gun Forums

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
 


Members online


Latest posts

Top