X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
X-Authority-Analysis: v=1.0 c=1 a=w_pzkKWiAAAA:8 a=xe8BsctaAAAA:8  a=H8cYQeWF_gPaRzW66X4A:9 a=nrsxAHmey_-VDbSrwIFk6jmPiDUA:4 a=eDFNAWYWrCwA:10  a=rPt6xJ-oxjAA:10
Message-ID: <47BF2048.1050303@byu.net>
Date: Fri, 22 Feb 2008 12:19:36 -0700
From: Eric Blake <ebb9@byu.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com, doug@cs.dartmouth.edu
Subject: Re: bash bobbles CR-LF
References: <200802221914.m1MJEwJB019090@tecumseh.cs.dartmouth.edu>
In-Reply-To: <200802221914.m1MJEwJB019090@tecumseh.cs.dartmouth.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Doug McIlroy on 2/22/2008 12:14 PM:
| Most cygwin utilities gracefully handle text files with lines
| terminated by either a bare newline or carriage return-linefeed.
| Not so with bash (version 3.2.33(18)-release (i686-pc-cygwin)).
| There are various symptoms, but the clearest is that, in
| a script with CR-LF terminations, an empty line draws the
| diagnostic, "$'\r': command not found".

And this is intentional, since by default, cygwin emulates Linux, and bash
on Linux doesn't ignore CR.  Reread the announcement (and consider using
d2u or enabling the shell option igncr to overcome the default).
http://cygwin.com/ml/cygwin-announce/2008-01/msg00002.html

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
volunteer cygwin bash maintainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHvyBI84KuGfSFAYARAhjLAKCgxmxzNdBVkHZqUDw2ojEaFzt6EgCbBUAd
0ekNwIpx2++zFlhu7BNfpVI=
=B7rX
-----END PGP SIGNATURE-----

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

