Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.unix.questions Subject: Re: sort question Message-ID: <10650048@hpisod2.HP.COM> Date: 4 May 89 22:49:10 GMT References: <199448@hrc.UUCP> Organization: Hewlett Packard, Cupertino Lines: 13 > How can I use the 'sort' command, to sort by two fields? > Example: > > _4 test _E _1 test _E > _2 test _E should be _2 test _E > _3 test _F _4 test _E > _1 test _E _3 test _F > ^ ^ > ^ ^ > sorted > by sort +0 -1 +2