After Cygwin Upgrade – Command Not Found

January 31, 2007

After upgrading Cygwin and starting I found that while sourcing my .bashrc file a lot of “: command not found” messages.

It turns out that this is caused by CR/LF endings needing to be CR. Strange, yesterday’s bash didn’t have a problem with this and today the new version does.

The fix is to run d2u on each file to ‘fix’ the line ending. If you have a .profile that sources your .bashrc don’t forget to run d2u on it as well.

Actually, this isn’t much of a fix as you’ll get very annoyed converting all your scripts.

A better solutions is to create a Windows environment variable SHELLOPTS and set it to igncr.

This sets up Bash to handle the strange line feeds .


Tags: cygwin