home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!coplex!trebor!root
- From: root@trebor.uucp (Bob Stockler)
- Subject: Re: a sort question
- Organization: Bob Stockler
- Date: Fri, 11 Dec 1992 22:55:22 GMT
- Message-ID: <1992Dec11.225522.23590@trebor.uucp>
- References: <4564@bimacs.BITNET>
- Lines: 12
-
- yedidya@bimacs.BITNET (Yedidya Israel) writes:
-
- >I want to sort a file according to two keys i.e. lines that equal
- >first key are compared upon their second key (sort +3-3.10 +3.12-3.14
- >in my case). My question concerns lines that equals in both keys how
- >do I guarantee that their order will be kept as in input file ???
-
- One way (I think) to _guarantee_ it would be to pipe the input through "nl"
- and use the input line numbers appropriately as an additional sort key.
-
- --
- Bob Stockler bob@trebor.uucp CIS: 72726,452
-