From owner-freebsd-stable Tue Aug 20 17:38:16 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 76FB537B400 for ; Tue, 20 Aug 2002 17:38:14 -0700 (PDT) Received: from HAL9000.homeunix.com (12-232-220-15.client.attbi.com [12.232.220.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0CBE43E65 for ; Tue, 20 Aug 2002 17:38:13 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.5/8.12.5) with ESMTP id g7L0cfYN018264; Tue, 20 Aug 2002 17:38:41 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.5/8.12.5/Submit) id g7L0ceaC018263; Tue, 20 Aug 2002 17:38:40 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Tue, 20 Aug 2002 17:38:40 -0700 From: David Schultz To: Andrey Alekseyev Cc: freebsd-stable@FreeBSD.ORG Subject: Re: minor annoyances Message-ID: <20020821003840.GA18202@HAL9000.homeunix.com> Mail-Followup-To: Andrey Alekseyev , freebsd-stable@FreeBSD.ORG References: <200208201915.g7KJFXl06220@uitm.zenon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200208201915.g7KJFXl06220@uitm.zenon.net> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Andrey Alekseyev : > 2. For some reason sh(1) doesn't handle things like 'command & && echo 1' > anymore. And this used to work perfectly _for years_ (literally) until now. > In fact, I myself have got a lot of shell scripts where I use something like > /usr/local/sbin/wgated.sh & && \ > echo "started" > which are now all broken :) > > Is it a historical bug/behaviour fixed or serious bug introduced? What were you expecting this to do? The && operator conditionally executes its right operand depending on the return value of its left operand. But if you run a task in the background, there is no immediate return value to speak of. The '& &&' construct only makes sense if you have a shell with magical predictive powers to correctly guess a program's return code before it finishes. While ash doesn't have those, I understand that this is one of the many new features planned for the next version of bash. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message