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.)
In reply to Re: Separate duplicate and unique records
by revdiablo
in thread Separate duplicate and unique records
by wsee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |