Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site tty3b.UUCP Path: utzoo!linus!decvax!harpo!floyd!whuxlb!pyuxll!eisx!npoiv!npois!hogpc!houxm!ihnp4!we13!otuxa!tty3b!tag From: tag@tty3b.UUCP Newsgroups: net.unix-wizards Subject: Re: /bin/sort bug Message-ID: <202@tty3b.UUCP> Date: Wed, 31-Aug-83 12:56:31 EDT Article-I.D.: tty3b.202 Posted: Wed Aug 31 12:56:31 1983 Date-Received: Thu, 1-Sep-83 08:21:18 EDT References: <133@ccieng5.UUCP> Organization: Teletype Corp., Skokie, Ill Lines: 23 * I don't think that /bin/sort works right. * (We are using 4.1bsd /bin/sort, if it makes any difference). * * If I type "sort +0 -1 input >out", I expect the input file to be sorted * beginning with the first field and ending before the second field. This is yet another bug that is really a feature. or vice-versa... In any case, it's probably in your documentation. In the version we're running (5.0.3) there is a paragraph in the manual for sort(1) which reads: > When there are multiple sort keys, later keys are compared > only after all earlier keys compare equal. *Lines that > otherwise compare equal are ordered with all bytes > significant.* (Emphasis mine) In other words: the whole line is used for sorting, you only get to specify what is of major importance. We learned this the hard way when trying to do multiple sorts on a database. Tom Gloger Teletype Corporation (ihnp4|we13) otuxa!tty3b!tag