Monday, April 30, 2012

sort -h

Aristotle Pagaltzis:

I recently discovered the -h switch of GNU sort, added in the coreutils 7.5 release from Aug 20, 2009. With this switch, sort will do a numeric sort of human-readable size numbers, i.e. it will accept “42M” and “1.3G” as numbers and put them in the right order.

Alas, Mac OS X ships with the 5.93 version of sort from 2005.

3 Comments RSS · Twitter

Michael H.

MacPorts to the rescue?

Let's hope someone find a security flaw in this tool to get it updated :-)

gogo gadget "brew install coreutils" ;)

Leave a Comment