|
Compare files
Hi Masters! I know this problem is quite difficult.
I have two files that looked like this:
File1
mary a b d
anne d e
jane g h
sam a
File2
role1 a d c d
role2 e f g h
role3 a b d
role4 a d e
role5 g h
It will first look into file1 then compare to all entries in file2 regardless of arrangement.
The output should be:
mary role1 role3
anne role 4
jane role2 role5
sam role1 role3 role4
I've tried some other way to do this but unsuccessful. Can it be done in UNIX? Please help. Thanks!
|