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: Subject: bash 3.2.49-22 problem (subscripts fail to run sometimes) From: Vitas Povilaitis To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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