how to find out duplicate contents/records

Kevin D. Clark clark_k at pannaway.com
Tue Jun 14 16:33:58 EDT 2005


Dave Peters writes:

> Any suggestion on how to find out duplicate
> contents/records? I find list of around 1500 username
> and would like to find out any duplicate. How can I do
> that?

Either of these two come to mind:

  sort | uniq -d 

  perl -ne '$seen{$_}++; END { map { print if ($seen{$_} > 1) } keys(%seen)}'


I assume that you have a list of just the usernames.  Redirect your
list into either of these and you'll see the dups.

Regards,

--kevin
-- 
Kevin's new Elephant Memory Systems Tribute Page:
    http://home.comcast.net/~kevin_d_clark/ems/



More information about the Discuss mailing list