in reply to Separate duplicate and unique records
Note: I know this is Seekers of Perl Wisdom, but there were already plenty of good Perl solutions, and I couldn't resist.
If you're on a unix (should I say GNU?) machine, or have cygwin installed on a Windows machine, you can very easily accomplish these tasks with sort and uniq.
Print unique lines:
sort -u numberlistPrint all duplicates:
sort numberlist | uniq -D(Or if you know the numberlist is already sorted, uniq -D numberlist will do.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Separate duplicate and unique records
by Thelonius (Priest) on Aug 07, 2003 at 21:43 UTC | |
by revdiablo (Prior) on Aug 07, 2003 at 23:10 UTC |