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 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: <4B4FD6FC DOT 4060903 AT byu DOT net> In-Reply-To: <4B4FD6FC.4060903@byu.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 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