From owner-freebsd-current Sun Sep 22 1: 0:16 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85A3A37B401 for ; Sun, 22 Sep 2002 01:00:14 -0700 (PDT) Received: from smtp02.iprimus.net.au (smtp02.iprimus.net.au [210.50.76.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ADAE43E42 for ; Sun, 22 Sep 2002 01:00:13 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from dilbert.robbins.dropbear.id.au ([210.50.80.34]) by smtp02.iprimus.net.au with Microsoft SMTPSVC(5.0.2195.4617); Sun, 22 Sep 2002 18:00:05 +1000 Received: from dilbert.robbins.dropbear.id.au (d04xntuzqzmupzne@localhost [127.0.0.1]) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6) with ESMTP id g8M7xvCj073845; Sun, 22 Sep 2002 17:59:58 +1000 (EST) (envelope-from tim@dilbert.robbins.dropbear.id.au) Received: (from tim@localhost) by dilbert.robbins.dropbear.id.au (8.12.6/8.12.6/Submit) id g8M7xsjp073844; Sun, 22 Sep 2002 17:59:54 +1000 (EST) (envelope-from tim) Date: Sun, 22 Sep 2002 17:59:53 +1000 From: Tim Robbins To: walt Cc: freebsd-current@FreeBSD.ORG Subject: Re: libc error question answered (partly) Message-ID: <20020922175953.A72230@dilbert.robbins.dropbear.id.au> References: <3D8D372B.9040806@hotmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3D8D372B.9040806@hotmail.com>; from wa1ter@hotmail.com on Sat, Sep 21, 2002 at 08:21:15PM -0700 X-OriginalArrivalTime: 22 Sep 2002 08:00:05.0951 (UTC) FILETIME=[1021CCF0:01C2620E] Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Sep 21, 2002 at 08:21:15PM -0700, walt wrote: > walt wrote: > > > My guess is that the syntax of 'sort' has changed since lorder > > was modified in March of 2001(?) > > David Wolfskill just pointed out to me that the behavior of 'sort' > is completely different in -STABLE, which I've just confirmed. > > Does anyone else see this behavior in -CURRENT? What happens > if you type 'sort +1' on your -CURRENT machine? The +POS1 -POS2 syntax for specifying sort keys was (from memory) marked as obsolescent in IEEE Std. 1003.2-1992 and removed (and disallowed) in 1003.1-2001. Many applications (like lorder) use the old syntax, so by default GNU sort does not conform to the 2001 standard and accepts the old syntax. If you set _POSIX2_VERSION=200112 in the environment before running GNU sort, it will try to conform to the newer standard and treat "+pos" as a filename instead of a sort key. The version of sort in -stable was written before the 2001 standard and doesn't disable the obsolescent sort key syntax. So the only explanation that I can think of is that you've got _POSIX2_VERSION set in the environment: $ _POSIX2_VERSION=200112 sort +1 sort: open failed: +1: No such file or directory lorder should probably get changed to use the new syntax some time too. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message