Michal Svoboda wrote:
> Drake Wyrm wrote 796 bytes:
>> Michal Svoboda <p...@spatium.org> wrote:
>> > Bob Proulx wrote 704 bytes:
>> > >     ** New features
>> > >       sort accepts a new option, --human-numeric-sort (-h): sort numbers
>> > >       while honoring human readable suffixes like KiB and MB etc.
>> >
>> > Interesting. So does it sort correctly 1 MB < 1000 KiB < 1 MiB ?
>>
>> $ { echo 1MB; echo 1000KiB; echo 1MiB; } | sort -h
>> sort: both SI and IEC prefixes present on units
>>
>> That would be a no to the "sort" part, but perhaps a yes to the
>> "correctly" part.
>
> Ah, this is obviously some strange use of the word *correctly* that
> I wasn't previously aware of.

;-)
Perhaps he meant that it works as documented:

  `-h'
  `--human-numeric-sort'
  `--sort=human-numeric'
       Sort numerically, as per the `--numeric-sort' option below, and in
       addition handle IEC or SI suffixes like MiB, MB etc (*note Block
       size::).  Note a mixture of IEC and SI suffixes is not supported
       and will be flagged as an error.  Also the numbers must be
       abbreviated uniformly.  I.E. values with different precisions like
       6000K and 5M will be sorted incorrectly.





Reply via email to