X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: mwoehlke Subject: Re: bash 3.1.18 seems seriously broken Date: Fri, 29 Sep 2006 10:03:34 -0500 Lines: 28 Message-ID: References: <451AEBAE DOT 6000703 AT cs DOT ucsd DOT edu> <451B1F43 DOT 1030400 AT byu DOT net> <451C93A0 DOT 7090203 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060909 Thunderbird/1.5.0.7 Mnenhy/0.7.4.0 In-Reply-To: <451C93A0.7090203@byu.net> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk 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 Eric Blake wrote: > According to Eric Blake on 9/27/2006 7:02 PM: >> change the script to ignore whitespace (make the first non-comment line >> set IFS appropriately, as in this snippet: >> IFS=' '' '' >> ' > > I retract this third suggestion. On investigation of the bash source, > bash still treats \r as a non-IFS-whitespace, so while it has some effect, > it is not a complete way to ignore \r\n line endings. > > I may still be able to add a cygwin-specific shopt for this, but recommend > a text mount in the meantime if you are forced to use \r\n endings. While I still think this is probably the best solution (and should be less of a performance hit on binary, right? You still read buffered, and just discard '\r' in parsing, yes?), I wouldn't make it Cygwin-specific. At minimum, I /know/ this also affects Interix (and again, you should check with Rodney; I think he's already done half the work), and - being a shopt that has to be manually enabled - there might be a handful of people that would appreciate having this option on other UNIX's. Anyway, that's my $0.02... -- Matthew My preferred shell is Christian. It's Bourne Again. (Wow, appropriate signature for $RANDOM to pick :)) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/