delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/15/19:54:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-5.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4EEA969C.1070100@redhat.com>
Date: Thu, 15 Dec 2011 17:53:48 -0700
From: Eric Blake <eblake AT redhat DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Igncr ineffective?
References: <32983438 DOT post AT talk DOT nabble DOT com>
In-Reply-To: <32983438.post@talk.nabble.com>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
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

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

On 12/15/2011 05:43 PM, manu0507 wrote:
>=20
> Hello,
>=20
> I'm running Cygwin 1.7.9-1 on Win7-64, with "GNU bash, version
> 4.1.10(4)-release (i686-pc-cygwin)".
>=20
> When executing a script (a gdb build script) with CR/LF line ends, bash
> reports errors on "unusual" lines of the script, even with igncr set. Here
> is an example with the script "configure":

How are you setting igncr?  Did you read the release announcement that
you now have to use 'set -o' and not 'shopt -s' to set it?  The full
details are here:

http://cygwin.com/ml/cygwin-announce/2011-02/msg00027.html

> I could manually convert all scripts to LFs only,=20

And that would be my preferred solution, as that is the most Linux-like,

> but I'd really prefer to
> avoid that (could wreak havoc!),

which is why igncr exists, for people unwilling to use sane line endings
in the first place.

> so my question is: isn't setting igncr
> supposed to make bash ignore the CRs in CR/LFs? If not, is there something
> else I can do to make it do so? And if so (i.e. this a bug), is there a
> correction to be had?

No one else has reported that igncr is broken as implemented, so most
likely a bug in your usage and you didn't actually enable it like you
thought you had.

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


--------------enig5EAA92252280E047DF78BC1A
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.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJO6pacAAoJEKeha0olJ0Nq0QUIAJtOpp/XsC+KIgNhLOY7/QQk
TyG7COpVzKtArKE+3cjxyNH3HDgfBAIqMOkqCX04mNfo0rIMfSrRL30Dq5iryZ3T
acyKA9VEm/beRm8LVIg8XEWZB9a9tzbv11YXCwRjH1oXtiiOdl3oZF9B2t2KigaP
M4tFHvgMe7mQxsXf539EkF01m3AmX+qZ7SVv5BV+IQ3rf3n81IjD16Dt8pStXKhm
ACmAEml1OI6gghh3WVRHtDRqvzZJWsB9XrlLzqt+qhAn57rmY1J+/DxRL96eEFZe
j2H3PFRwn+T376F5V+Byy6U1NQnUtZ62/QYI4CwSgQ4TEA4rqjZQ1GUY1odJytg=
=4+CG
-----END PGP SIGNATURE-----

--------------enig5EAA92252280E047DF78BC1A--

- Raw text -


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