[PLUG] Sorting A Text File on Multiple Fields

Paul Heinlein heinlein at madboa.com
Thu Sep 1 20:26:05 UTC 2011


On Thu, 1 Sep 2011, Rich Shepard wrote:

> On Thu, 1 Sep 2011, Hal Pomeranz wrote:
>
>> Just adding "-k1,3" should do what you want...
>
> Hal,
>
> Thank you. I tried "-k1,2,3" and learned k takes no more than 2 
> values. Using 1,3 seems to do the trick.

I wrote an article on sorting IP addresses that provides a little 
example of field sorting in GNU sort:

   http://www.madboa.com/geek/sort-addr/

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/



More information about the PLUG mailing list