Does the .sh file have windows style line feeds by any chance?
You can check by either cat -A <SH_FILE> or opening in vim and setting: set list or maybe your graphical editor tells you.

Either...