I have following problem:
When I run a shell script, that has been stored with CR+LF line endings, I get following error:
myscript.sh: line 1: cd: $'somedir\\someotherdir\r': No such file or directory
I have researched the problem and there is a solution for Cygwin shell, found here:
- Create a .bashrc file
Put this inside:
export SHELLOPTS set -o igncr
- Reload Cygwin shell
However, I use Cmder and I'd like to apply this in it. But, I do not know how. As noted here, Cygwin used to have an option to set the use of DOS file endings as a default during installation, but got rid of it (no idea why).
The weirdest thing of all is that I have the same setup on my older computer, also Windows 10, and everything works well, even with CRLF endings...