From: Eric Blake <ebb9 at byu dot net>
To: cygwin at cygwin dot com
Date: Mon, 02 Oct 2006 21:51:04 -0600
Subject: [ANNOUNCEMENT] Updated: bash-3.1-9
Reply-to: cygwin at cygwin dot com
Reply-to: The Cygwin Mailing List <cygwin at cygwin dot com>

--------------------------------------------------------------------------------

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A new release of bash, 3.1-9, is now available, replacing 3.1-8 as the
current version.  3.1-6 remains as the previous version.

NEWS:
=====
Due to complaints on the mailing list, this version attempts to alleviate
some of the pain of people who have difficulties working around \r\n line
endings in scripts residing on binary mounts.

[snip]

Second, this release adds a new shopt, igncr, which dynamically
tells bash to ignore all \r in the input file when it is set; however, it
defaults to unset.  With this shopt, it is possible to make a bash script
work on binary mounts even if it has \r\n line endings, by adding the
following line as the first non-comment:
 shopt -s igncr;#

[snip]

If you want your script to be
portable to other platforms or shells that don't understand igncr, you can
write it as:
(shopt -s igncr) 2>/dev/null && eval 'shopt -s igncr';#

Alternatively, you can set the environment variable BASH_ENV to the name of a
file containing startup commands for all bash scripts.  If the above command is
issued in the file, the shopt command will be set before the script is
read - and
DOS-format scripts will therefore execute correctly without modification.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to