From owner-freebsd-stable@FreeBSD.ORG Wed Feb 10 08:58:16 2010 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09190106566C for ; Wed, 10 Feb 2010 08:58:16 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id 832998FC14 for ; Wed, 10 Feb 2010 08:58:15 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o1A8wEWF040941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Feb 2010 09:58:14 +0100 (CET) (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o1A8wEPf040940 for stable@freebsd.org; Wed, 10 Feb 2010 09:58:14 +0100 (CET) (envelope-from uqs@FreeBSD.org) Date: Wed, 10 Feb 2010 09:58:14 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: stable@FreeBSD.org Message-ID: <20100210085814.GE9748@acme.spoerlein.net> Mail-Followup-To: stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: numeric sort(1) is broken on -STABLE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2010 08:58:16 -0000 Hi guys, not sure if this is a pilot error, but it seems to me that gnu sort -n is broken on at least -STABLE (couldn't test -CURRENT yet). It somehow does not manifest when using a simple list and sorting on a specific column, but it always happens to me when using it in combination with find(1). % truncate -s10m a; truncate -s5m b; truncate -s800k c % find a b c -ls|sort -nk7,7 8 64 -rw-r--r-- 1 uqs wheel 10485760 Feb 10 09:13 a 10 64 -rw-r--r-- 1 uqs wheel 5242880 Feb 10 09:13 b 12 64 -rw-r--r-- 1 uqs wheel 819200 Feb 10 09:13 c % find a b c -ls|sort -gk7,7 12 64 -rw-r--r-- 1 uqs wheel 819200 Feb 10 09:13 c 10 64 -rw-r--r-- 1 uqs wheel 5242880 Feb 10 09:13 b 8 64 -rw-r--r-- 1 uqs wheel 10485760 Feb 10 09:13 a at least -g does what is expected and I can work around this for the time being. Here's bsdsort % find a b c -ls|bsdsort -nk7,7 12 64 -rw-r--r-- 1 uqs wheel 819200 Feb 10 09:13 c 10 64 -rw-r--r-- 1 uqs wheel 5242880 Feb 10 09:13 b 8 64 -rw-r--r-- 1 uqs wheel 10485760 Feb 10 09:13 a and this is on Solaris 8 % find a b c -ls|sort -nk7,7 546728 16 -rw-r--r-- 1 spoerul xxx 819200 Feb 10 09:49 c 546727 16 -rw-r--r-- 1 spoerul xxx 5242880 Feb 10 09:48 b 546724 16 -rw-r--r-- 1 spoerul xxx 10485760 Feb 10 09:48 a It even occured to me, that we don't have a sort regression suite under tools/regression. Anyone know a place to find one with a suitable license? Regards, Uli