delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.8 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: | <20091212024903.GA3452@KCJs-Computer> |
References: | <26753996 DOT post AT talk DOT nabble DOT com> <20091212024903 DOT GA3452 AT KCJs-Computer> |
Date: | Sun, 13 Dec 2009 21:55:12 +1300 |
Message-ID: | <db95995b0912130055r762e443ucb43fe5041ab5f33@mail.gmail.com> |
Subject: | Re: BASH Shell - Configuration Problem? |
From: | David Antliff <david DOT antliff AT gmail DOT com> |
To: | cygwin AT cygwin DOT 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 Sat, Dec 12, 2009 at 15:49, Gary Johnson <garyjohn AT spocom DOT com> wrote: > On 2009-12-11, rgc3679 wrote: >> Any ideas? > > Thanks for all the details. =A0That really helps. =A0It looks to me as > though your script file has CR-LF (DOS) line endings rather than LF > (Unix) line endings. =A0The current version of Cygwin's bash sees only > the LF line endings and includes the CR as part of the script. =A0You > can use the d2u utility to fix this. Also, if this is the cause, you can use the Cygwin-specific igncr option in bash to ignore CR characters: $ bash -O igncr ... Note that this has to be set at the time an instance of bash is started (-O igncr), and AFAIK cannot be set afterward (e.g. via shopt). I've set this in Cygwin.bat and used it successfully to allow users to run bash scripts that are in DOS text-file format. This turns out to be really important when using git with core.autocrlf=3Dtrue... -- David. -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |