www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Date: | Wed, 22 Jul 2009 08:15:34 -0400 |
Message-ID: | <f70324590907220515m694580d7i140551f35c921a99@mail.gmail.com> |
Subject: | bash 3.2.49-22 problem (subscripts fail to run sometimes) |
From: | Vitas Povilaitis <vitas AT GracefulBoot DOT com> |
To: | cygwin AT cygwin DOT com |
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 |
Occasionally, a subscript fails to run, as in this example: $ cat t.sh #!/bin/bash PACKAGEVERSION=$1 PACKAGE=`echo $PACKAGEVERSION | sed 's/^\(.*\)-.*$/\1/'` VERSION=`echo $PACKAGEVERSION | sed 's/^.*-\(.*\)$/\1/'` echo "PACKAGE $PACKAGE VERSION $VERSION" PACKAGE=`echo $PACKAGEVERSION | sed 's/^\(.*\)-.*$/\1/'` VERSION=`echo $PACKAGEVERSION | sed 's/^.*-\(.*\)$/\1/'` echo "PACKAGE $PACKAGE VERSION $VERSION" PACKAGE=`echo $PACKAGEVERSION | sed 's/^\(.*\)-.*$/\1/'` VERSION=`echo $PACKAGEVERSION | sed 's/^.*-\(.*\)$/\1/'` echo "PACKAGE $PACKAGE VERSION $VERSION" $ ./t.sh Hello-1.0.0 PACKAGE Hello VERSION 1.0.0 PACKAGE Hello VERSION PACKAGE Hello VERSION 1.0.0 $ ./t.sh Hello-1.0.0 PACKAGE Hello VERSION 1.0.0 PACKAGE Hello VERSION 1.0.0 PACKAGE VERSION 1.0.0 This is under Cygwin 1.5.25-15 under Windows XP Ver. 5.1 Build 2600 Service Pack 2. This is easily repeatable. I run into the problem by running the script 4 to 6 times. Is this a Cygwin bash bug? I wonder if it's related to running on a multi-core processor. I don't have the problem under Linux. Sincerely, Vitas Povilaitis -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |