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.

cygwin window showing the error

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:

  1. Open these files in vim
  2. :set fileformat=unix
  3. :wq
  4. Restart cygwin

What do you know, the errors are gone!

Check out this cygwin announcement If you are curious about the details.

Back to blog...