delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/04/26/13:22:44

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Odd behavior of scripts in dos mode
Date: Thu, 26 Apr 2012 10:21:46 -0700
Lines: 15
Message-ID: <jnc07c$pgd$1@dough.gmane.org>
References: <jnbl6p$qav$1 AT dough DOT gmane DOT org> <4F995E78 DOT 7020607 AT redhat DOT com>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120420 Thunderbird/12.0
In-Reply-To: <4F995E78.7020607@redhat.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On 4/26/2012 7:40 AM, Eric Blake wrote:
> On 04/26/2012 08:13 AM, Andrew DeFaria wrote:
>> I remember that Cygwin used to not be able to run scripts that were
>> converted or were in "DOS" mode - had trailing carriage returns in the
>> file. It would fail because the #! line might have /bin/bash\r which was
>> not a file (bash with a carriage return that is). But the behavior has
>> changed. Now it seems to ignore the trailing carriage return and it
>> execs bash itself. But it fails later on with other carriage returns.
> If you want bash to ignore carriage returns, then ask it to do so:
> http://sourceware.org/ml/cygwin-announce/2011-02/msg00027.html
Interesting and it kinda explains that this is relatively new behavior 
and why it seems to interpret the #! line correctly.
-- 
Andrew DeFaria <http://defaria.com>
What hair color do they put on the driver's licenses of bald men?


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