I generally don’t upgrade my Cygwin installation as often as some of the other software that I use, but yesterday I upgraded it and found a surprise.
Every time I would start Cygwin, it would give me several “: command not found” lines and syntax errors. After I got a chance to look into the problem, it turned out to be a very simple one. Basically my ~/.bashrc and ~/.aliases were using the dos line ending, instead of unix. Given that fact, all I had to do was:
- Open these files in vim
-
:set fileformat=unix
-
:wq
- Restart cygwin
What do you know, the errors are gone!
Check out this cygwin announcement If you are curious about the details.