From owner-freebsd-chat@FreeBSD.ORG Sat Jul 18 17:23:05 2009 Return-Path: Delivered-To: chat@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572CD106566B for ; Sat, 18 Jul 2009 17:23:05 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 19C618FC0A for ; Sat, 18 Jul 2009 17:23:05 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 96BF26D418; Sat, 18 Jul 2009 19:03:39 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 76B0F844B5; Sat, 18 Jul 2009 19:03:39 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Adrian Wontroba References: <200907172257.QAA15292@lariat.net> <20090718000116.GA8379@steerpike.hanley.stade.co.uk> <200907180121.TAA16416@lariat.net> <20090718024835.GB8379@steerpike.hanley.stade.co.uk> Date: Sat, 18 Jul 2009 19:03:39 +0200 In-Reply-To: <20090718024835.GB8379@steerpike.hanley.stade.co.uk> (Adrian Wontroba's message of "Sat, 18 Jul 2009 03:48:35 +0100") Message-ID: <867hy5sz2s.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Brett Glass , chat@freebsd.org Subject: Re: Bourne shell short-circuit operators improperly documented X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 17:23:05 -0000 Adrian Wontroba writes: > Perhaps the syntax could have been " and " / " or " (as in Perl's > and / or statement qualifiers (something() or die "oops";), but it is > far too late to change sh syntax. We have to live with it or use a > different shell or language. Pop quiz: what are the semantics of the follwing command line after your proposed change: echo I need a box and cat litter for my new kittens. There is absolutely nothing surprising or illogical about the && and || command separators. There is absolutely nothing surprising about "zero means success, non- zero means failure" either - that's how most Unix system calls and many standard C library functions work. I'm sure we all have better things to do than argue about this non- issue. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no