Shell script loop runs out of memory

Eric Blake eblake@redhat.com
Fri Jun 1 13:00:00 GMT 2012


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.
> 
> 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.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120601/9164c7c2/attachment.sig>


More information about the Cygwin mailing list