From owner-freebsd-chat@FreeBSD.ORG Sat Jul 18 16:39:53 2009 Return-Path: Delivered-To: freebsd-chat@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C21106564A for ; Sat, 18 Jul 2009 16:39:53 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id E0AB28FC1A for ; Sat, 18 Jul 2009 16:39:52 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n6IGdZG0015653; Sat, 18 Jul 2009 18:39:50 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n6IGdZxG015652; Sat, 18 Jul 2009 18:39:35 +0200 (CEST) (envelope-from olli) Date: Sat, 18 Jul 2009 18:39:35 +0200 (CEST) Message-Id: <200907181639.n6IGdZxG015652@lurza.secnetix.de> From: Oliver Fromme To: freebsd-chat@FreeBSD.ORG In-Reply-To: <200907172257.QAA15292@lariat.net> X-Newsgroups: list.freebsd-chat User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Sat, 18 Jul 2009 18:39:51 +0200 (CEST) Cc: Subject: Re: Bourne shell short-circuit operators improperly documented X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-chat@FreeBSD.ORG 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 16:39:53 -0000 Actually I've never regarded "&&" and "||" (and also "|" and "&") as operators, like real operators in a programming language, but as command separators, much like ";", but with special semantics. Note that foo && bar && baz foo || bar || baz is the same as if foo; then if bar; then baz; fi; fi if ! foo; then if ! bar; then baz; fi; fi Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "If you aim the gun at your foot and pull the trigger, it's UNIX's job to ensure reliable delivery of the bullet to where you aimed the gun (in this case, Mr. Foot)." -- Terry Lambert, FreeBSD-hackers mailing list.