From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15507 invoked from network); 10 Feb 2009 02:12:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Feb 2009 02:12:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 64274 invoked from network); 10 Feb 2009 02:12:01 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Feb 2009 02:12:01 -0000 Received: (qmail 24655 invoked by alias); 10 Feb 2009 02:11:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26540 Received: (qmail 24642 invoked from network); 10 Feb 2009 02:11:54 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 10 Feb 2009 02:11:54 -0000 Received: from prunille.vinc17.org (vinc17.pck.nerim.net [213.41.242.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id C2F6080271F0 for ; Tue, 10 Feb 2009 03:11:50 +0100 (CET) Received: by prunille.vinc17.org (Postfix, from userid 501) id 4412E3263EBD; Tue, 10 Feb 2009 03:11:49 +0100 (CET) Date: Tue, 10 Feb 2009 03:11:49 +0100 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: Re: POSIX and the "&>" operator Message-ID: <20090210021149.GQ2378@prunille.vinc17.org> Mail-Followup-To: zsh-workers@sunsite.dk References: <200902070002.n1702oSx013214@pws-pc.ntlworld.com> <090206195109.ZM10798@torch.brasslantern.com> <20090207224839.224dda7f@pws-pc> <090206145030.ZM10333@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <090206145030.ZM10333@torch.brasslantern.com> X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.19-vl-r26315 (2009-01-27) X-Virus-Scanned: ClamAV 0.92.1/8969/Mon Feb 9 23:17:33 2009 on bifrost X-Virus-Status: Clean On 2009-02-06 14:50:29 -0800, Bart Schaefer wrote: > The following is part of an exchange on the austin-group mailing list. > The assertion is that "foo&>bar" has a well-defined semantics in POSIX > sh and therefore the bash extension (which zsh adopted) to make "&>" a > synonym for "2>&1 >" is in violation of POSIX compliance. IMHO, this is not clear. I agree with David Korn when he says: ---------------------------------------------------------------------- The way the standard is written, the grammar lists operators that are required. It doesn't say whether implementations can support operators that aren't listed. In section 2.3, token recognition, the standard says: 2. If the previous character was used as part of an operator and the current character is not quoted and can be used with the current characters to form an operator, it shall be used as part of that (operator) token. If implementations are allowed to provide additional operators, then this requires that conforming script leave a space after every operator character. This would mean that command &> file is not conforming. ---------------------------------------------------------------------- On 2009-02-07 22:48:39 +0000, Peter Stephenson wrote: > We really ought to have a POSIX emulation separate from sh. I have a > feeling we've discussed this before. Yes, at least here: http://www.zsh.org/mla/workers/2007/msg00852.html http://www.zsh.org/mla/workers/2008/msg00342.html -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)