delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/02/22/14:20:10

X-Recipient: archive-cygwin AT delorie DOT 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 AT byu DOT 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 AT cygwin DOT com, doug AT cs DOT dartmouth DOT edu
Subject: Re: bash bobbles CR-LF
References: <200802221914 DOT m1MJEwJB019090 AT tecumseh DOT cs DOT dartmouth DOT edu>
In-Reply-To: <200802221914.m1MJEwJB019090@tecumseh.cs.dartmouth.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

-----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 AT byu DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019