delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/05/31/15:50:53

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EAEfKx0+cKEcV/2dsb2JhbABEtBWBB4IZAQEEEihPAgEIDScCEB8TJQEBBAEaGodpnDqcMo93YAOMeY4QigKCfA
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>, Jordan <uptownb0y AT yahoo DOT com>
Date: Thu, 31 May 2012 15:50:24 -0400
Subject: RE: Shell script loop runs out of memory
Message-ID: <0105D5C1E0353146B1B222348B0411A20A770C827D@NIHMLBX02.nih.gov>
References: <loom DOT 20120531T193933-322 AT post DOT gmane DOT org> <CANs8wdBYOBGsmp2iFSSOOd5FZ4qb3i3a-E2EM8LBbPKz=su5Pg AT mail DOT gmail DOT com> <786EBDA1AC46254B813E200779E7AD36023A42C2 AT srv1163ex1 DOT flightsafety DOT com> <loom DOT 20120531T211830-607 AT post DOT gmane DOT org>
In-Reply-To: <loom.20120531T211830-607@post.gmane.org>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q4VJonOO027541

The following are just ideas - totally untested.

You might try changing
    [[ condition ]]
to
    [ condition ]
Perhaps single brackets use memory differently than double brackets.

If that doesn't work, try changing
    #!/bin/sh
(which calls bash) to
    #!/bin/dash
You will have to have retained the double to single bracket change,
because dash does not have double brackets.  Perhaps dash is more
efficient with memory than bash.

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.


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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019