{"id":4758,"date":"2012-04-30T16:45:55","date_gmt":"2012-04-30T21:45:55","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=4758"},"modified":"2012-04-30T16:45:58","modified_gmt":"2012-04-30T21:45:58","slug":"sort-h","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2012\/04\/30\/sort-h\/","title":{"rendered":"sort -h"},"content":{"rendered":"<p><a href=\"http:\/\/plasmasturm.org\/log\/binduh\/\">Aristotle Pagaltzis<\/a>:<\/p>\n<blockquote cite=\"http:\/\/plasmasturm.org\/log\/binduh\/\"><p>I recently discovered the <code>-h<\/code> switch of <abbr title=\"GNU&rsquo;s Not Unix\">GNU<\/abbr> <tt>sort<\/tt>, added in the coreutils 7.5 release from Aug 20, 2009. With this switch, <code>sort<\/code> will do a numeric sort of human-readable size numbers, <abbr title=\"that is,\">i.e.<\/abbr> it will accept &ldquo;42M&rdquo; and &ldquo;1.3G&rdquo; as numbers and put them in the right order.<\/p><\/blockquote>\n<p>Alas, Mac OS X ships with the 5.93 version of <tt>sort<\/tt> from 2005.<\/p>","protected":false},"excerpt":{"rendered":"<p>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 &ldquo;42M&rdquo; and &ldquo;1.3G&rdquo; as numbers and put them in the right order. Alas, Mac OS X ships [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-4758","post","type-post","status-publish","format-standard","hentry","category-technology"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4758","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=4758"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4758\/revisions"}],"predecessor-version":[{"id":4760,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/4758\/revisions\/4760"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=4758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=4758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=4758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}