Microsoft
Software
Hardware
Network
Question : using uniq command
I have a pipe delimited file with tens fields.
Two of the fields are patronnumber and cardnumber
I want to sort by cardnumber and then remove the first row of lines that duplicate the cardnumber. I was trying to do with the uniq command in Unix.
Any suggestions?
If it cannot be done with uniq, is there are perl script that will remove duplicates?
Answer : using uniq command
So it sounds like you want to keep the cardnumber with the largest patronnumber
perl -F'\|' -ne '$n{$F[1]}=$_ unless $n{$F[1]} && $n{$F[1]} > $_;END{ print values %n}' file
Random Solutions
Is there any way to limit what the users see in shared calendars in Exchange 2003 / Exchange 2007?
How to set Public Folder "Retention" so that if a public folder is accidently deleted it can easily be recovered through Outlook or PFDAVadmin
Change key default value by script
look up table value with sql
The SELECT permission was denied on the object 'sysdtspackages90', database 'msdb', schema 'dbo'.
Sharing camcorder footage
How can I detect a pixel color of an image in Flash using ActionScript 2?
I need a NAS server with 4TB that is expandable to 8TB for around $3000.
sd channels in LCD or plasma ???
windows server 2008 foundation