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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Compare Lines within a file

Reply to Message Icon

Name: hp_admin20
Date: August 3, 2007 at 11:34:06 Pacific
OS: HP-UX
CPU/Ram: 1GB
Product: 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!



Sponsored Link
Ads by Google

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

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Compare Lines within a file

Extracting lines from a file www.computing.net/answers/unix/extracting-lines-from-a-file/5403.html

how to replace a line in a file www.computing.net/answers/unix/how-to-replace-a-line-in-a-file/7214.html

Script to Remove lines from a file www.computing.net/answers/unix/script-to-remove-lines-from-a-file/5268.html