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
Basic php/mysql questions
C# 4.0 convert from 12h format to 24h format.
Diffrence between debug & release versions
SSRS Combine two datasets into one data region - Must be in report not in SQL server
Lightweight network management for mobile workforce
how can i find all ILO boards on a network
Should you dismount exchange database before exhange updates?
Setting Reporting Services data driven subscription Using Web Service
V2P (Windows 2008)
AP running G and N