[nycbug-talk] Scripting Question

Roland Dowdeswell elric at imrryr.org
Fri Mar 9 14:28:02 EST 2007


On 1173465392 seconds since the Beginning of the UNIX epoch
James wrote:
>
>Kevin Reiter wrote:
>> Follow-up question:  Is there a quick and dirty way to check for duplicate e
>ntries, and eliminate them if they exist?
>>
>> For example:
>>
>> 1
>> 1
>> 2
>> 3
>> 3
>> 3
>> 4
>> 5
>>
>> I need: 1,2,3,4,5
>>
>> Is there a quick check/solution for this?
>>   
>
>uniq should work, no?

sort -u.

or if you want line counts, something like:

sort | uniq -c | sort -nr

--
    Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/



More information about the talk mailing list