coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] [PATCH] sort: tune and refactor --debug code, and fix mi


From: Paul Eggert
Subject: Re: [coreutils] [PATCH] sort: tune and refactor --debug code, and fix minor underlining bug
Date: Thu, 05 Aug 2010 14:06:00 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6

On 08/05/10 13:46, Eric Blake wrote:

> Hmm - we document that '1M' and 'M' are synonyms in the 'Block size'
> node of the manual

They are synonymous in the operand to --block-size, but that's
a different syntax.  For example, --block-size="'1kB" is also
documented there, but "'1kB" is not a valid number for sort -h.
Conversely, "2.3k" is valid for sort -h, but --block-size=2.3k
is not valid.  The syntax for sort -h numbers is documented
under the description of the --human-numeric-sort option.

> On the other hand, I just noticed this bug pre-patch, and
> haven't yet applied the patch to see if it is still present:
> 
> $ echo '1Mi Mi' | ../coreutils/src/sort --debug -k1,1h -k2,2h
> ../coreutils/src/sort: using `en_US.UTF-8' sorting rules
> 1Mi Mi
> ___
>     __
> ______
> 
> Without a suffix B, I don't think the lone 'i' should be considered as
> part of the -h suffix.

In the latest version, "i" is never part of the -h suffix.  The -h
comparisons pay no attention to the difference between power-of-1024
and power-of-1000 suffixes, so the "i" should never be underlined.
The current output of the above test case is:

sort: using `en_US.UTF-8' sorting rules
1Mi Mi
__
    ^ no match for key
______



reply via email to

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