On 08/10/10 04:16, Philip Ganchev wrote: > It would be useful if sort could understand numeric abbreviations, for > example 1k = 1,000 and 1K = 1024. This need arises for me very often > when I want a sorted list of human-readable file sizes like the output > of "du -h". Currently, to use "sort" you have to resort to raw > numbers, which are hard to read if they have 7 or more digits. I'm > sure the feature would useful more generally. > > This feature can be implemented as part of the "--general-numeric" > option to "sort". > > Alternatively, maybe coreutils should include a general program to > parse numbers in text and re-format them, while outputting the rest of > the text unchanged.
from the NEWS for coreutils 7.5 sort accepts a new option, --human-numeric-sort (-h): sort numbers while honoring human readable suffixes like KiB and MB etc. cheers, Pádraig.