On 10/07/2010 09:16 PM, 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 already exists. From the 7.5 NEWS: sort accepts a new option, --human-numeric-sort (-h): sort numbers while honoring human readable suffixes like KiB and MB etc. The latest stable version is 8.5, with 8.6 due shortly. Consider upgrading. -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
