Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!husc6!cmcl2!rutgers!mtune!whuts!tes From: tes@whuts.UUCP (STERKEL) Newsgroups: comp.unix.questions,comp.sources.wanted Subject: NO More and Thanks Re: Multiple Field Sorts in UNIX(tm) Message-ID: <2469@whuts.UUCP> Date: Wed, 22-Jul-87 07:24:45 EDT Article-I.D.: whuts.2469 Posted: Wed Jul 22 07:24:45 1987 Date-Received: Sat, 25-Jul-87 01:38:43 EDT References: <2459@whuts.UUCP> Organization: AT&T Bell Laboratories Lines: 25 Summary: Question Answered Xref: mnetor comp.unix.questions:3299 comp.sources.wanted:1685 In article <2459@whuts.UUCP>, tes@whuts.UUCP (STERKEL) writes: > <*> > Now for the problem: > I need a multiple field sort that maintains sub-field order. Color me embarassed. Seriously, I *really did* read the UNIX(tm) manual, but missed the following: "When there are multiple sort keys, later keys are compared only after all earlier keys compare equal." e.g. You can use more than one field as a key. Thus, sort +0 -1 +4 -5 file will use FIELD1 FIELD5 as the key. my thanks to: Bill Stewart, AT&T Bell Labs ihnp4!ho95c!wcs Ken rutgers!rochester!ken (who leaped to my assistance, without flaming my faux pas.) -- Terry Sterkel {clyde|harvard|cbosgd|allegra|ulysses|ihnp4}!whuts!tes [opinions are obviously only my own]