tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Minor updates to sort ?

    Date:        Sat, 28 May 2016 22:29:51 -0700
    From:        Alistair Crooks <>
    Message-ID:  <>

  | Living on the edge and top posting aggresively, these changes would be good
  | to have.

OK, but I will wait a day or two more to allow for more comments (or
more suggested improvements.)

I was asked (in off-list mail) to also add something to the manual about
how multiple -k args work.   This is more verbose that what was suggested...

     sort compares records by comparing the key fields selected by -k
     arguments, from first given to last, until discovering a difference.  If
     there are no -k arguments, the whole record is treated as the key.  After
     exhausting the -k arguments, if no difference has been found, then the
     result depends upon the -u and -S option settings.  With -u the records
     are considered identical, and one is supressed.  Otherwise with -s set
     (default) the records are left in their original order, or with -S (posix
     mode) the whole record is considered as a tie breaker.

I also (now) have (currently anyway) in the proposed updated man page, the
following commented text immediately after the paragraph above ...

.\" If you fail to understand why it doesn't matter which order
.\" the records are output when they are wholly identical, there 
.\" is nothing that this man page can say that wll help!

(This is because there is a comment in the posix spec about this
being unspecified...)


Home | Main Index | Thread Index | Old Index