From owner-freebsd-questions Tue Jul 2 12:29:35 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA03047 for questions-outgoing; Tue, 2 Jul 1996 12:29:35 -0700 (PDT) Received: from tombstone.sunrem.com (tombstone.sunrem.com [206.81.134.54]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id MAA03039 for ; Tue, 2 Jul 1996 12:29:32 -0700 (PDT) Received: (from brandon@localhost) by tombstone.sunrem.com (8.6.12/8.6.12) id NAA25216; Tue, 2 Jul 1996 13:27:54 -0600 Date: Tue, 2 Jul 1996 13:27:54 -0600 (MDT) From: Brandon Gillespie To: Terry Lambert cc: questions@FreeBSD.org Subject: Re: Bug in /bin/sh In-Reply-To: <199607021853.LAA08602@phaeton.artisoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 2 Jul 1996, Terry Lambert wrote: > > test $1 = abc && { [..] > > The "&&" is odd. Not really, it is standard bourne shell (from the man pages): Control operators: & && ( ) ; ;; | || It acts as you suspect, so the following constructs would be equivalent (I've noticed that most of the ultrix boot scripts prefer the latter method): if [ -x "$file" ]; then if `$file`; then echo "oiy, it ran" fi fi Or: [ -x "$file" ] && { $file && echo "oiy, it ran" } -Brandon Gillespie