X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4B503EBB.1000904@towo.net> References: <4B4FD6FC DOT 4060903 AT byu DOT net> <4B503EBB DOT 1000904 AT towo DOT net> Date: Fri, 15 Jan 2010 08:37:44 -0500 Message-ID: Subject: Re: Can't set variables in a while loop that is passed to the rest of the script. From: "Mark J. Reed" To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Friday, January 15, 2010, Thomas Wolff wrote: > As was responded before, this isn't supposed to work in a pipe. Not in ksh either, I think, No, it works in real ksh. If the last command in a pipeline is a builtin, it is run in the current shell. $ unset foo bar $ echo ${foo=hiya} | read bar $ echo foo=$foo bar=$bar the above will set bar but not foo in ksh. Some shells will set foo but not bar. Current bash sets neither. No shell sets both. But not Cygwin-related. -- Mark J. Reed -- 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