bug-coreutils
[Top][All Lists]
Advanced

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

Re: Human readable sort


From: Jim Meyering
Subject: Re: Human readable sort
Date: Fri, 22 May 2009 13:06:01 +0200

Pádraig Brady wrote:
>>From 75bb07bb620d37d26467ab86ffcf73d47479b358 Mon Sep 17 00:00:00 2001
> From: Michael Speer <address@hidden>
> Date: Mon, 27 Apr 2009 14:51:29 +0100
> Subject: [PATCH] sort: new --human-numeric-sort option to sort KiB MB etc.
>
> * NEWS: Document the new option
> * doc/coreutils.texi (sort invocation): ditto
> * src/sort.c (main): handle the new -human-numeric-sort option (-h).

Please make one small change to that log message:

    s/ -human/ --human/

And in the documentation,

  +Sort numerically, as per the @option{--numeric-sort} option,
  +and in addition handle IEC or SI suffixes like MiB, MB etc.
  +Note a mixture of these suffixes is not supported and will
  +be flagged as an error. Also the numbers must be abbreviated unambiguously.
  +I.E. 5000K and 6M will be sorted incorrectly for example.

Eventually, it'd be nice to explain in detail why those
would cause trouble.

Maybe s/unambiguously/consistently/
or                   /uniformly/
and mention that it's the inconsistent precision that causes trouble.

Hmm.... actually those two *are* sorted properly for me:

    $ printf '%s\n' 5000K 6M| src/sort --human
    5000K
    6M

However, these two are not:

    $ printf '%s\n' 7000K 6M| src/sort --human
    7000K
    6M




reply via email to

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