X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-10.6 required=5.0	tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <505A3D52.2020800@redhat.com>
Date: Wed, 19 Sep 2012 15:46:58 -0600
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0
MIME-Version: 1.0
To: cygwin@cygwin.com, rfhaney@yahoo.com
Subject: Re: bash output: ./configure: line 16: $'\r': command not found
References: <1348088813.66748.YahooMailClassic@web111515.mail.gq1.yahoo.com>
In-Reply-To: <1348088813.66748.YahooMailClassic@web111515.mail.gq1.yahoo.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBC1A798B9F0406C155ECFBBB"
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

--------------enigBC1A798B9F0406C155ECFBBB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 09/19/2012 03:06 PM, Richard Haney wrote:
> Generally, there are lots and lots of script files for every build.  That=
 means my builds could be crashing right and left all over the place if bas=
h does not always ignore carriage returns when it is supposed to.  So I nee=
d for bash to be able to always ignore carriage returns

Then ask bash to do that.  It does not ignore carriage returns by
default (because it does not ignore carriage returns on Linux by
default), but the thing about defaults is that they can be changed.

> The second problem is that I can find no documentation for the bash '-o i=
gncr' command-line option.

Patches welcome; but here's the cygwin-specific documentation that DOES
mention it:

http://cygwin.com/ml/cygwin-announce/2011-02/msg00027.html
/usr/share/doc/Cygwin/bash.README

which includes these suggestions:

4c. To affect all scripts, export the environment variable BASH_ENV,
pointing to a file that sets the shell option as desired.  Bash will
source this file on startup for every script.
4d. Added in the bash-3.2-2 release: export the environment variable
SHELLOPTS with igncr included in it.  It is read-only from within bash,
but you can set it before invoking bash; once in bash, it auto-tracks
the current state of 'set -o igncr'.  If exported, then all bash child
processes inherit the same option settings; with the exception added in
3.2.9-11 that certain interactive options are not inherited in
non-interactive use.

--=20
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--------------enigBC1A798B9F0406C155ECFBBB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBCAAGBQJQWj1SAAoJEKeha0olJ0NqfckH/2tbAirqz3SCq5bbw+x8ah22
NL1Pvws2RTY/JZEq/2JDO4MSZr+//Mw++jtzAx0T+R5Jj35hk9ai886KFS/e3SS6
Qkz9ylpmjpROSU3zJgq3LZ7/ZTgQN5weFOwvPaBk+IIQMPWzh4OhSCgdf2jmSWOG
DvbNnEWw1g8YzUCccCBfgN6woNexr6bKs2I6hd4R/QR43GCVAqo9JeGuiuUhxNoJ
4h+YedI0fMzttHxoBPUPbmBU8Xe4Fq2s+/dh20y4zoJhB2kijwNgHkz+wQSY0LOR
PdHHwBSB981/q3WgvfTmPBwPU9d6AGz2JdS509tVlA+xjMxlRWGAnkSn1p3g5B8=
=GB3E
-----END PGP SIGNATURE-----

--------------enigBC1A798B9F0406C155ECFBBB--
