[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5804: sort --human
From: |
Drake Wyrm |
Subject: |
bug#5804: sort --human |
Date: |
Tue, 30 Mar 2010 15:46:54 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Michal Svoboda <address@hidden> 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.
$ { echo 1001KiB; echo 1000KiB; echo 1MiB; } | sort -h
1000KiB
1001KiB
1MiB
$ { echo 1001KB; echo 1000KB; echo 1MB; } | sort -h
1000KB
1001KB
1MB
Seems to work fine when you give it just one type of unit to handle.
--
I have a firm grip on reality. Now I can strangle it.
-- Gordon Paynter