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: Subject: Re: BASH Shell - Configuration Problem? From: David Antliff To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 Sat, Dec 12, 2009 at 15:49, Gary Johnson 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