Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • In order to get the numbers in the first row recognized correctly I had to add | sort -n and | sort -n -r for descending order respectively (sorting was not part of the question). Sorting might be done better... Commented Sep 23, 2014 at 17:28
  • Seems a little overkill to have to sort the entire file, but worked OK for me. Commented May 25, 2015 at 5:39
  • Good point @Karl, though not requested, using sort -n here makes a lot more sense. Answer updated. Commented Jun 16, 2015 at 13:44