CR/LF problems after upgrade

Fri Jan 5 18:45:00 GMT 2007


> 2. d2u is your friend.  You can use it to convert any problematic script
> into binary line endings.

Several people I work with, who are even less technical than I am, use
cygwin and edit scripts with various editors.  So this will not work.

> 3. Cygwin text mounts automatically work with either line ending style,
> because the \r is stripped before bash reads the file.  If you absolutely
> must use files with \r\n line endings, consider mounting the directory
> where those files live as a text mount.  However, text mounts are not as
> well tested or supported on the cygwin mailing list, so you may encounter
> other problems with other cygwin tools in those directories.

I don't know what mounts are, or how to use them.

> 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.

I tried:

cd /etc
echo '(set -o igncr) 2>/dev/null && set -o igncr; # comment is needed'
export BASH_ENV=/etc/bash_env

This did not work.

> 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' or 'shopt -s igncr'.  If exported, then
> all bash child processes inherit the same option settings.

I tried:


and got:

bash: SHELLOPTS: readonly variable

> 5. You can also experiment with the IFS variable for controlling how bash
> will treat \r during variable expansion.

I don't know what the IFS variable is, or how to use it.

View this message in context:
Sent from the Cygwin Users mailing list archive at

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list