I am trying to lean Bash scripting from cygwin. When i manually type the following lines in command prompt, everything works and I see that the number from 1 to 10 are printed o
Another possible solution using unix text editor vi:
open file in vi edit with vi filename.sh command;
vi filename.sh
type in vi :set ff=unix command;
:set ff=unix
save file with :wq
:wq
It will save the file with unix line endings.