sort: new --human-numeric-sort option to sort KiB MB etc.
authorMichael Speer <knomenet@gmail.com>
Mon, 27 Apr 2009 13:51:29 +0000 (14:51 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 26 May 2009 13:49:17 +0000 (14:49 +0100)
commit159faba1376ffd5a46fe4bbc780d85dd3e502cea
tree26c0be6ee86af0609569bdc7af0999e03b1e2b3e
parentc45c51fe97193898f3909dcf5e4c0e117ab239a2
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).
(human_numcompare): A new function to compare SI and IEC suffixes
before falling back to the standard --numeric comparison.
(find_unit_order): A new helper function to find the order
of magnitude of a number string as determined by its suffix.
(check_mixed_SI_IEC): A new helper function to exit with error
if both SI and IEC suffixes are presented.
* tests/misc/sort: Add 8 tests to test the new functionality.
* THANKS: Update
NEWS
THANKS
doc/coreutils.texi
src/sort.c
tests/misc/sort