Quote:
Originally Posted by Rally_Point
I've thought that maybe there's a way to walk through the first file and with each line then walk through each line in the second file (something like a nested loop statement) and then go from there.
Thanks
|
Hi, have You tried this?
Something like:
Code:
while read name;do grep "$name" file2;done < file1
And You could do something like:
Code:
while read name;do echo $name:;grep "$name" file2;done < file1
Or some other action based on return value of grep?
Code:
while read name;do ;grep -q "$name" file2 && echo $name found in file2;done < file1
And it would help if You could show the source of the file, if this doesn't work. Have You considered sorting the files and using diff?
Best regards
/Lakris
|