== GNU _sort_'s _-h_ option I only [[recently https://twitter.com/thatcks/status/273883335690952704]] became aware of GNU sort's _-h_ option, which strikes me as a beautiful encapsulation of everything (both good and bad) that people attribute to GNU programs and their profusion of options. GNU sort's _-h_ is like _-n_ (sort numerically) except that it sorts numerically for GNU's 'humane' numbers, as produced by (for example) GNU du's _-h_ option. This leads naturally to [[a variant of a little script that I've already talked about ../sysadmin/LittleScriptsIII]]: > _du -h | sort -hr | less_ On the one hand, _-h_ is clearly useful in both commands. Humane numbers are a lot easier to read and grasp than plain numbers, and now GNU sort will order them correctly for you. On the other hand you can see the need for a _-h_ argument to sort as evidence of an intrinsic problem with _du -h_; in this view, GNU is piling hack on top of hack. The arguable Unix way might be a general _hum_ command that humanized all numbers (or specific columns of numbers if you wanted); that would make the example into '_du | sort -nr | hum | less_', which creates a general tool at the price of making people add an extra command to their pipelines. I don't have any particular view on whether GNU sort's _-h_ option is Unixly wrong or not. I do think that it's (seductively) convenient, and now that I've become aware of it it's probably going to work its way into various things I do. (This could spark a great debate on what the true Unix way is, but I'm not going to touch that one right now.)