On 09/19/2012 03:06 PM, Richard Haney wrote: > Generally, there are lots and lots of script files for every build. That > means my builds could be crashing right and left all over the place if bash > does not always ignore carriage returns when it is supposed to. So I need > for bash to be able to always ignore carriage returns
Then ask bash to do that. It does not ignore carriage returns by default (because it does not ignore carriage returns on Linux by default), but the thing about defaults is that they can be changed. > The second problem is that I can find no documentation for the bash '-o > igncr' command-line option. Patches welcome; but here's the cygwin-specific documentation that DOES mention it: http://cygwin.com/ml/cygwin-announce/2011-02/msg00027.html /usr/share/doc/Cygwin/bash.README which includes these suggestions: 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. 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'. If exported, then all bash child processes inherit the same option settings; with the exception added in 3.2.9-11 that certain interactive options are not inherited in non-interactive use. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature