This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bash CR and backquotes trouble

Larry Hall (Cygwin) a écrit :
On 11/02/2006, Nicolas Roche wrote:
Will try Dan solution with the new version of bash. As I said in my previous mail, if you are interesting in the results I will send them.

Why not.

Ok, here are the results of my experiences. I have set my environment so that igncr is the default in order to avoid the issue with backquotes and win32/mingw commands

What I did is the following:
- put shopt -s igncr in my .bashrc file
- source .bashrc in  .bash_profile

This solve the cases for which bash is used interactively either as a login shell or not.

For non interactive sessions, I use BASH_ENV variable along with SHELL=/bin/bash so that gnu make works correctly.

The only remaining issue is when bash is invoked as /bin/sh and that the shell is non interactive. In this case, the bash documentation says that no
startup file is read ..... So I don't know how to set igncr by default.... The issue occurs for example with mklibgcc when building GCC.

mklibgcc is using /bin/sh and generates a makefile called

The trouble here is that CR characters are inserted in the resulting in the middle of some lines, so the CR characters won't be ignored when make -f is invoked....

Is there any way to set the default behavior of sh even in non interactive mode ?

Thanks in advance

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]