Date: Tue, 20 Aug 2002 17:38:40 -0700 From: David Schultz <dschultz@uclink.Berkeley.EDU> To: Andrey Alekseyev <uitm@zenon.net> Cc: freebsd-stable@FreeBSD.ORG Subject: Re: minor annoyances Message-ID: <20020821003840.GA18202@HAL9000.homeunix.com> In-Reply-To: <200208201915.g7KJFXl06220@uitm.zenon.net> References: <200208201915.g7KJFXl06220@uitm.zenon.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake Andrey Alekseyev <uitm@zenon.net>: > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821003840.GA18202>