delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/05:09:15

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4B503EBB.1000904@towo.net>
Date: Fri, 15 Jan 2010 11:08:59 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Can't set variables in a while loop that is passed to the rest of the script.
References: <EDF49EC9787F914CA157FF6927D65A88302633AB3C AT CBMCC-X7-MBX10 DOT ad DOT cibc DOT com> <4B4FD6FC DOT 4060903 AT byu DOT net>
In-Reply-To: <4B4FD6FC.4060903@byu.net>
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

Eric Blake wrote:
> According to Damo, David on 1/14/2010 3:39 PM:
>    
>> Hi,
>>
>> I had a script that worked on UNIX, but on Cygwin it does not work. When I set a variable in a while loop I can't use it after the loop. However, this worked in UNIX. Any ideas why?
>>      
> Yes.  ksh vs. bash.  http://tiswww.case.edu/php/chet/bash/FAQ, E4.  Not
> cygwin-specific.
>    
As was responded before, this isn't supposed to work in a pipe. Not in 
ksh either, I think, and I tried it, with ksh on a Sun and pdksh on cygwin.
So I don't think this is a ksh vs bash issue.
David, maybe you happened to have set the variable you checked before 
callling the script already?
------
Thomas

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