GNU bug report logs - #19287
sort: doc: improve "-k/--key" explanation

Previous Next

Package: coreutils;

Reported by: Leslie Satenstein <lsatenstein <at> yahoo.com>

Date: Sat, 6 Dec 2014 13:04:02 UTC

Severity: wishlist

To reply to this bug, email your comments to 19287 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#19287; Package coreutils. (Sat, 06 Dec 2014 13:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leslie Satenstein <lsatenstein <at> yahoo.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sat, 06 Dec 2014 13:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leslie Satenstein <lsatenstein <at> yahoo.com>
To: bug-coreutils <at> gnu.org
Subject: Request to improve the Man document for "sort."
Date: Sat, 06 Dec 2014 08:02:32 -0500
I had a lot of head scratching until someone clarified the
documentation.

Here is the line and explanation that bothers me.
Explanation of -k ... 

        -k, --key=POS1[,POS2]
            start a key at POS1 (origin 1), end it at POS2 (default end
        of line) 
        

with accompanying explanation

        POS is F[.C][OPTS], where F is the field number and C the
        character position in the field; both are origin 1. If neither
        -t nor -b is in effect, characters in a field are counted from
        the beginning of the preceding whitespace. OPTS is one or more
        single-letter ordering options, which override global ordering
        options for that key. If no key is given, use the entire line as
        the key. 
        


It was not clear to me that when -t was used with a field delimited
file, then to sort only by the entire enclosed field, we need to specify
-k F.F  and that -k F'.F' may occur multiple times.

It was only with the SEE ALSO that with the visit to info coreutils sort
invocation that explanation about sorting fields was described.

Can a clarification of the explanation for -k be provided.

I would add one sentence after the last line of the above indented
paragraph.
                                                                        
   For additional rules pertaining to the sort of field delimited
   records, consult info coreutils sort invocation
        
      
We should not have to visit two references (man and info) in order to
setup sort keys.

Regards

Leslie Satenstein





Severity set to 'wishlist' from 'normal' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 01:44:02 GMT) Full text and rfc822 format available.

Changed bug title to 'sort: doc: improve "-k/--key" explanation' from 'Request to improve the Man document for "sort."' Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 01:44:02 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.