From owner-freebsd-stable@FreeBSD.ORG Thu Feb 11 18:55:17 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 996AF106566C for ; Thu, 11 Feb 2010 18:55:17 +0000 (UTC) (envelope-from kazuaki@aliceblue.jp) Received: from p0248fb.kngwff01.ap.so-net.ne.jp (p024afb.tokyff01.ap.so-net.ne.jp [121.2.74.251]) by mx1.freebsd.org (Postfix) with ESMTP id 3C6AF8FC0C for ; Thu, 11 Feb 2010 18:55:16 +0000 (UTC) Received: from undine.aliceblue.jp (unknown [192.168.11.22]) by pd5f7be.tokyff01.ap.so-net.ne.jp (Postfix) with ESMTP id 894F646726 for ; Fri, 12 Feb 2010 03:42:19 +0900 (JST) Message-ID: <4B74502D.5050509@aliceblue.jp> Date: Fri, 12 Feb 2010 03:45:01 +0900 From: Kazuaki ODA User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.7) Gecko/20100211 Thunderbird/3.0.1 MIME-Version: 1.0 To: stable@freebsd.org References: <20100210085814.GE9748@acme.spoerlein.net> In-Reply-To: <20100210085814.GE9748@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: 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: Thu, 11 Feb 2010 18:55:17 -0000 On 2010/02/10 17:58, Ulrich Spörlein wrote: > 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 Hi, here is a patch I've submitted about 4 years ago... http://www.freebsd.org/cgi/query-pr.cgi?pr=gnu/93566 -- Kazuaki ODA