X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=Kd08CeW4Oo0A:10 a=tzBgeO_4N2YA:10  a=xe8BsctaAAAA:8 a=qZpf4ZjIyiYus26zBZ8A:9 a=ECIDzI5DucR_4gk7zKT_dMw32g0A:4  a=eDFNAWYWrCwA:10 a=rPt6xJ-oxjAA:10
Message-ID: <48AE435F.5000600@byu.net>
Date: Thu, 21 Aug 2008 22:41:03 -0600
From: Eric Blake <ebb9@byu.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: csih-0.1.7-1
References: <announce.48A789B6.3010103@cwilson.fastmail.fm> <48A78C6F.2050403@cwilson.fastmail.fm> <20080820134209.GN29104@calimero.vinschen.de> <48ADA260.3020901@cwilson.fastmail.fm> <20080821173028.GA24882@calimero.vinschen.de> <48AE2E66.8060704@cwilson.fastmail.fm>
In-Reply-To: <48AE2E66.8060704@cwilson.fastmail.fm>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Charles Wilson on 8/21/2008 9:11 PM:
> 
> if [ shell_fun_call -a $var -eq "foo" ]
> 
> doesn't work.  It should be
> 
> if ( shell_fun_call && [ $var -eq "foo" ])

You don't necessarily need the extra subshells.

if shell_fun_call && [ $var -eq "foo" ]

is valid shell, provided $var is guaranteed to be non-empty, doesn't start
with any character that might confuse test (such as '-', '!', '(', etc.),
and doesn't contain whitespace.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiuQ18ACgkQ84KuGfSFAYDNSQCfcaIQz8MZPUkFUSzmZW5++XW/
BI4An1Z39VnnQfHI6W7FoC65MkpKez1a
=EcWz
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

