bug-coreutils
[Top][All Lists]
Advanced

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

bug#14226: Sort -c takes in account fields that were outside sorting sco


From: Camion SPAM
Subject: bug#14226: Sort -c takes in account fields that were outside sorting scope
Date: Sun, 21 Apr 2013 01:59:57 +0100 (BST)

Then, I suggest adding after -c : 
  -c, --check, --check=diagnose-first  check for sorted input; do not sort

>> Note that, when selecting fields with -k while using the -c switch, user 
>> should probably also disable the last-resort comparison with -s to obtain 
>> the expected result.

after -k : 

  -k, --key=POS1[,POS2]     start a key at POS1 (origin 1), end it at POS2 
(default end of line) 
>> By default, if two lines are considered equivalent regarding the key 
>> specification, sort will try to resolve the equivalence by comparing the 
>> whole lines. This is called the "last-resort comparison" (and may be 
>> disabled with -s)

and after -s :
  -s, --stable              stabilize sort by disabling last-resort comparison

>> (See -k)


________________________________
 De : Eric Blake <address@hidden>
À : Camion SPAM <address@hidden> 
Cc : "address@hidden" <address@hidden> 
Envoyé le : Samedi 20 avril 2013 17h54
Objet : Re: bug#14226: Sort -c takes in account fields that were outside 
sorting scope
 

On 04/19/2013 06:56 PM, Camion SPAM wrote:
> Well, I'm satisfied with your suggestion of adding -s. 
> I would just add that this might be something that should be added to the man 
> page.

The man page is generated from 'sort --help', and there, we are trying
to favor brevity.  But it might indeed be worth adding to the 'info
sort' page.  I read that page, and notice that while '-c' and '-C' are
mentioned first, details about '-k' and '-s' are several screenfuls
away, so it is not obvious that those two options can affect the
behavior of -c.  You could help by reading that page, and finding the
spot(s) where adding a sentence would have helped you; if you could
propose the location and wording to add, then we can work with that to
turn it into a formal patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


reply via email to

[Prev in Thread] Current Thread [Next in Thread]