Q: Cygwin bash shell script complains about I created the following file in Windows Notepad:
#!/bin/bash
for i in $(ls) do $i done

Note that the file has three lines (the last one is empty).
When I run the script, I get the error message:
$ ./script
./script: line 3: syntax error: unexpected end of file

Removing the last line (that is, ending the file right after "done") does not change anything.
I suspect this has to do with the CR+LF v. LF difference between Unix and Windows, but I thought Cygwin was expected to deal with that; since it runs on a Windows platform, it would make sense for it to be able to deal with text files created in that same platform.
So why am I seeing this error?
