3 Oct 2006 05:51
Updated: bash-3.1-9
Eric Blake <ebb9 <at> byu.net>
2006-10-03 03:51:04 GMT
2006-10-03 03:51:04 GMT
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. First, if a script is specified with a DOS path instead of a POSIX path (although this is not the recommended behavior in cygwin), bash will ensure that the underlying mount mode is respected, rather than the default cygwin behavior of using binary mode, allowing the use of DOS paths on text mounts the way 3.1-6 behaved. 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;# The comment is necessary since bash parses a line at a time before processing shopt, so you want to avoid interpreting the last potential \r literally before the change takes place. 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';# For now, the igncr shopt is only documented in this mail; I thought it better to get 3.1-9 out the door than to spend time also patching the online documentation and delaying the release. It is also a chance for any feedback to the list to influence whether I need to make 3.1-10 in the near future.(Continue reading)
RSS Feed