X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-10.3 required=5.0	tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4FC8BCE5.2070605@redhat.com>
Date: Fri, 01 Jun 2012 07:00:21 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Shell script loop runs out of memory
References: <loom.20120531T193933-322@post.gmane.org> <CANs8wdBYOBGsmp2iFSSOOd5FZ4qb3i3a-E2EM8LBbPKz=su5Pg@mail.gmail.com> <786EBDA1AC46254B813E200779E7AD36023A42C2@srv1163ex1.flightsafety.com> <loom.20120531T211830-607@post.gmane.org> <0105D5C1E0353146B1B222348B0411A20A770C827D@NIHMLBX02.nih.gov> <CE9C056E12502146A72FD81290379E9A4360C73F@ENFIRHMBX1.datcon.co.uk>
In-Reply-To: <CE9C056E12502146A72FD81290379E9A4360C73F@ENFIRHMBX1.datcon.co.uk>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig9D81D147C90BCAEA42A02BC2"
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

--------------enig9D81D147C90BCAEA42A02BC2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 06/01/2012 03:20 AM, Adam Dinwoodie wrote:
> Buchbinder, Barry wrote:
>> You might try changing
>>     [[ condition ]]
>> to
>>     [ condition ]
>> Perhaps single brackets use memory differently than double brackets.
>=20
> They do: [[ condition ]] is interpreted by the shell; [ condition ] forks=
 to
> call /usr/bin/[.exe.

No, it doesn't.  Bash has a built-in [ rather than forking, since
running tests is so common.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enig9D81D147C90BCAEA42A02BC2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJPyLzlAAoJEKeha0olJ0Nqk8IH/izuhuNEZ3kT5JNUmSXesHD9
QOl0wOIY+6kIjEuYqRNhmqbO4GuzDcBdTTU1LWrnw2zwiNscqPJIDLANVDc8eVsq
ytaWhpMCVVPdVGnpGejPzspWffU2ALnGFbAEkcyT5Z4Z6oFYDj78mw+odD0dlncz
YMNu+DRWSsEc6nGgjD8utcwsyfB0asWX0s1OFhsVH18KQUZHssM7AYSzQLxKMn7r
Zr5cG6WPrqPAd+g38syiblPtNQsnrGImfce665tcUjySS2A/HT/MRv1o9P9TErnF
fbOyv07Hm8GHO0u+uRXGRsDPPn+gObxJwXeCgXouxmZs6U6fFpyUveWCak3Oj+o=
=J70C
-----END PGP SIGNATURE-----

--------------enig9D81D147C90BCAEA42A02BC2--
