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
______