From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5dbb79ad844dc05439e260be7dead23b@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Sun, 27 Sep 2009 10:10:53 +0100 In-Reply-To: <1cd6434aef47eeafe99955082c22eb55@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] sort strangeness Topicbox-Message-UUID: 781de6aa-ead5-11e9-9d60-3106f5b1d025 You probably want it to look at the rest of the line after sorting according to the initial numeric string, like this: cpu% cat tmp/sorttest 2 7 2.1 2.1.4 2.1.1 term% sort +0n +1 -t. -u tmp/sorttest 2 2.1 2.1.1 2.1.4 7 I think the "strangeness" you observed is consistent with what the man page says: -n An initial numeric string, consisting of optional white space, optional plus or minus sign, and zero or more digits with optional decimal point, is sorted by arith- metic value. -u Suppress all but one in each set of equal lines. Ignored bytes and bytes outside keys do not par- ticipate in this comparison.