Computing.Net > Forums > Unix > Compare Lines within a file

Compare Lines within a file

Reply to Message Icon

Original Message
Name: hp_admin20
Date: August 3, 2007 at 11:34:06 Pacific
Subject: Compare Lines within a file
OS: HP-UX
CPU/Ram: 1GB
Model/Manufacturer: B2600
Comment:

I want to compare lines in a file and if there is duplicate information in a certain field(s) remove it but leave the field seperators.

fileA
a632713,2007/08/02,test,08:00:35,10:45:21,08:00:48,09:35:17
a632713,2007/08/02,test,08:00:35,10:45:21,09:35:33,10:45:21
a632713,2007/08/02,test,11:01:24,12:00:09,11:01:36,12:00:09

fileB
a632713,2007/08/02,test,08:00:35,10:45:21,08:00:48,09:35:17
a632713,2007/08/02,test,,,09:35:33,10:45:21
a632713,2007/08/02,test,11:01:24,12:00:09,11:01:36,12:00:09

Any help would be great!!!
Thanks!


Report Offensive Message For Removal


Response Number 1
Name: Vertabreaker
Date: August 24, 2007 at 10:43:02 Pacific
Reply: (edit)

You want to compare lines from 1 file to lines in another file? or You want to compare lines within the same file?


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Compare Lines within a file

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge