This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Igncr ineffective?


On 12/15/2011 05:43 PM, manu0507 wrote:
> 
> Hello,
> 
> I'm running Cygwin 1.7.9-1 on Win7-64, with "GNU bash, version
> 4.1.10(4)-release (i686-pc-cygwin)".
> 
> 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, 

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.

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

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]