Subject: Re: sort -urn losing data
To: Jeremy C. Reed <reed@reedmedia.net>
From: Curt Sampson <cjs@cynic.net>
List: tech-userlevel
Date: 01/20/2006 09:32:37
On Thu, 19 Jan 2006, Jeremy C. Reed wrote:

> Using this data:
>   1 callrpc
>   1 tzset
>   1 callrpc
> sort -rnu will return:
>   1 callrpc

> But the -u switch is defined (from The Open Group manual page) as "Unique:
> suppress all but one in each set of lines having equal keys."

I believe that this may be the "key" (ehrm!) to your problem. Using -n,
the key becomes the number the beginning of the line, not the entire
line. Thus, you're giving it three lines with the same key, and it
surpresses two of them.

cjs
-- 
Curt Sampson            <cjs@cynic.net>             +81 90 7737 2974
   The power of accurate observation is commonly called cynicism
   by those who have not got it.    --George Bernard Shaw