Wednesday, 14 August 2013

comparison of contents of 2 files in unix

comparison of contents of 2 files in unix

i have 2 files each having 3 fields . file-1 has 3000 records whereas
file-2 has 10,000 records
file-1
no id name
. . .. . . ..
file-2
no id name
. . .. . . ..
i want a code in c such that id and name fields in first file are searched
in respective fields in second file and if a match is found it should be
printed along with no , id , name of second file contents. sometimes there
might be more than one match. in such cases both the records should be
displayed.
i guess its pretty easy ! but i ain't getting how to compare various
fields. thanks in advance :)

No comments:

Post a Comment