X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.8 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 Subject: Re: Odd behavior of scripts in dos mode Date: Thu, 26 Apr 2012 07:33:22 -0700 Lines: 16 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120309 Thunderbird/11.0 In-Reply-To: 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 04/26/2012 07:26 AM, Earnie Boyd wrote: > On Thu, Apr 26, 2012 at 10: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. > http://cygwin.com/faq/#faq.api.cr-lf That's an interesting read but it really does nothing to explain the behavior I've observed. If it did then it would not be able to invoke bash\r. -- Andrew DeFaria
24 hours in a day...24 beers in a case...coincidence? -- 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