Bash 3.1.17(8) CR/LF problem

Dave Korn
Wed Sep 27 19:58:00 GMT 2006

On 27 September 2006 20:42, Malcolm Nixon wrote:

> I recently updated to Bash 3.1.17(8) and found my local build system
> failing due to the removal of CR/LF support:
> "A script on a binary mount that uses \r\n line endings will probably
> encounter syntax errors or odd variable assignments, because the \r is
>  treated literally.  If this happens to you, use d2u to fix the line
> endings, or change your script to live in a text mount point.  A
> script  that resides on a text mount can have either line ending (even
>  inconsistently mixed), but be aware that text mount points are
> slower,  due to \r\n filtering."
> Unfortunately simply running "d2u" isn't a solution because:

  So why isn't using a textmode mount a solution?

>     * Some revision control systems make the files read-only.

  Huh?  You mean, permanently?  How are you supposed to edit them?  You don't
need an RCS for a read-only file that can't ever be changed, you can just burn
a copy to CD.

>     * Some detect the change to <LF> as changes require manual merging.

  What, on lines that you /haven't/ edited locally?  That's just a bug.

>     * Some translate files to a "Local" format (CR/LF on Windows).

  FCOL, what on earth does an rcs think it's playing at, tampering with your
data?  Any rcs that doesn't give you back exactly what you put into it is just
plain buggy.  Nobody asked for a "automatically mangle my data whether I want
you to or not" feature.

> I think the bigger issue here is that this arbitrary change will break
> a "significant" number of existing scripts. 

  YM a "significant" number of /broken/ scripts.  Try running any of them on a
linux box and see what you get.

> I contract for a few
> companies that use Cygwin/Bakefile to achieve support for multiple
> compilers/tool-chains, and for hourly auto-build servers. This change
> will break all of them - some of which have been functional for over 4
> years.
> In my opinion a better solution would have been to err on the side of
> compatibility and only use the new fast readline code if manually
> enabled.

  Then according to your opinion, everyone else in the world has to suffer
from crippled bash performance because you can't be bothered to fix your
systems.  Better for /you/ maybe, but it's not always all about you.  In MY
opinion, a better solution would be to err on the side of efficency, and only
use the old slow readline code if manually enabled.

Can't think of a witty .sigline today....

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list