whitebread

8.29.2006

command line radix sort ala GK

The whole lab was telling him it wouldn’t work, until he sat down and wrote this:

cat yourfile | sort -k2 -g | sort -s -k3

sweet.

edit: You have to run the sort on the columns in the reverse order you might expect.

Leave a Reply

 

The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.