Help- Unix File Compare- Struggling
I had posted this earlier about 3 weeks ago and had recieved a response and I did sort both the files and the comm command is still not working.
Can someone please assist me, I would really appreciate it.
Below is what I am trying to do
I need to compare File A with File B and create FILE C with the difference record only. What I mean is File A has records and File B has records, so FILE C will only have the records which are not in File A. Hope I am making sense. The data layout is that each data element is within double quotes and each field is seperated by a comma. In the example below after the second name there is a double quote and 3 commas, the first comma is the field seperator and the other 2 commas are for fields that there is no data, hence the commas
Below are the sample file layout
File A
"00004006676","JOHN","SMITH",,,"1944-06-03",
"00004200004","JOHN","SMITH",,,"1944-06-03",
"00004200075","JOHN","SMITH",,,"1944-06-03",
"00004200101","JOHN","SMITH",,,"1944-06-03",
"00004200155","JOHN","SMITH",,,"1944-06-03",
"00004200245","JOHN","SMITH",,,"1944-06-03",
"00004200318","JOHN","SMITH",,,"1944-06-03",
"00004201166","JOHN","SMITH",,,"1944-06-03",
"00004202042","JOHN","SMITH",,,"1944-06-03",
"00004202189","JOHN","SMITH",,,"1944-06-03",
"00004202234","JOHN","SMITH",,,"1944-06-03",
"00004202263","JOHN","SMITH",,,"1944-06-03",
"00004202298","JOHN","SMITH",,,"1944-06-03",
"00004202365","JOHN","SMITH",,,"1944-06-03",
"00004202373","JOHN","SMITH",,,"1944-06-03",
"00004202491","JOHN","SMITH",,,"1944-06-03",
"00004202640","JOHN","SMITH",,,"1944-06-03",
"00004202745","JOHN","SMITH",,,"1944-06-03",
"00004202994","JOHN","SMITH",,,"1944-06-03",
"00004203032","JOHN","SMITH",,,"1944-06-03",
"00004203044","JOHN","SMITH",,,"1944-06-03",
"00004203238","JOHN","SMITH",,,"1944-06-03",
"00004203539","JOHN","SMITH",,,"1944-06-03",
"00004203553","JOHN","SMITH",,,"1944-06-03",
"00004203655","JOHN","SMITH",,,"1944-06-03",
"00004203669","JOHN","SMITH",,,"1944-06-03",
"00004203722","JOHN","SMITH",,,"1944-06-03",
"00004203762","JOHN","SMITH",,,"1944-06-03",
"00004203860","JOHN","SMITH",,,"1944-06-03",
"00004203887","JOHN","SMITH",,,"1944-06-03",
"00004207046","JOHN","SMITH",,,"1944-06-03",
File B
"00004006676","JOHN","SMITH",,,"1944-06-03",
"00004200004","JOHN","SMITH",,,"1944-06-03",
"00004200075","JOHN","SMITH",,,"1944-06-03",
"00004200101","JOHN","SMITH",,,"1944-06-03",
"00004200125","JOHN","SMITH",,,"1944-06-03",
"00004200130","JOHN","SMITH",,,"1944-06-03",
"00004200155","JOHN","SMITH",,,"1944-06-03",
"00004200245","JOHN","SMITH",,,"1944-06-03",
"00004200318","JOHN","SMITH",,,"1944-06-03",
"00004201166","JOHN","SMITH",,,"1944-06-03",
"00004202042","JOHN","SMITH",,,"1944-06-03",
"00004202189","JOHN","SMITH",,,"1944-06-03",
"00004202234","JOHN","SMITH",,,"1944-06-03",
"00004202263","JOHN","SMITH",,,"1944-06-03",
"00004202298","JOHN","SMITH",,,"1944-06-03",
"00004202307","JOHN","SMITH",,,"1944-06-03",
"00004202365","JOHN","SMITH",,,"1944-06-03",
"00004202373","JOHN","SMITH",,,"1944-06-03",
"00004202491","JOHN","SMITH",,,"1944-06-03",
"00004202640","JOHN","SMITH",,,"1944-06-03",
"00004202745","JOHN","SMITH",,,"1944-06-03",
"00004202994","JOHN","SMITH",,,"1944-06-03",
"00004203032","JOHN","SMITH",,,"1944-06-03",
"00004203238","JOHN","SMITH",,,"1944-06-03",
"00004203539","JOHN","SMITH",,,"1944-06-03",
"00004203553","JOHN","SMITH",,,"1944-06-03",
"00004203655","JOHN","SMITH",,,"1944-06-03",
"00004203669","JOHN","SMITH",,,"1944-06-03",
"00004203722","JOHN","SMITH",,,"1944-06-03",
"00004203762","JOHN","SMITH",,,"1944-06-03",
"00004203860","JOHN","SMITH",,,"1944-06-03",
"00004203887","JOHN","SMITH",,,"1944-06-03",
"00004207046","JOHN","SMITH",,,"1944-06-03",
The final results in File C would be the following records since these records are in File B and not in File A
"00004200125","JOHN","SMITH",,,"1944-06-03",
"00004200130","JOHN","SMITH",,,"1944-06-03",
"00004202307","JOHN","SMITH",,,"1944-06-03",
Sincerely
Hadi Lalani
Last edited by vino; 01-06-2007 at 03:44 PM..
Reason: remove email address..