Computing.Net > Forums > Unix > identifying duplicate records

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.

identifying duplicate records

Reply to Message Icon

Name: pabi
Date: February 14, 2006 at 15:35:48 Pacific
OS: solaris
CPU/Ram: dont know
Product: sun
Comment:

I am trying to identify duplicate records in a file, once the records are identified my program must raise a flag and list out the duplicate records.


pavan



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: February 14, 2006 at 18:39:26 Pacific
Reply:

If your file is NOT sorted, use the sort command and use the -u option.

If the file is already sorted, pipe the file to the uniq command.


0

Response Number 2
Name: Dlonra
Date: February 15, 2006 at 18:31:43 Pacific
Reply:

thats not correct. sort -u produces only 1 of multiples

sort file|uniq -d


0

Sponsored Link
Ads by Google
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: identifying duplicate records

Identify duplicate records in UNIX www.computing.net/answers/unix/identify-duplicate-records-in-unix/5892.html

Idendifying duplicate records www.computing.net/answers/unix/idendifying-duplicate-records/7141.html

unix script - find duplicate record www.computing.net/answers/unix/unix-script-find-duplicate-record/5260.html