Create shell script in Windows for Linux/Unix
The problem is due to the different end of line in Windows and Linux/Unix platform. Windows is using CRLF while Linux is using LF only.
I have 2 favourite text editor that can solve this problem.
1. Context --- It has a function "Convert Text to Unix (LF Only)" under its Tools menu
2. NotePad++ --- It has an "EOL Conversion --> Unix format" under its Edit menu
I have tested them, both are working fine.