There are a couple of ways to make bash scripts run on windows (cygwin). This is to take care of the \r\n issue that comes up. File editors in windows use \r\n to denote end of line.
- Modify file ending using Notepad++ (Edit->EOL Conversion)
- Run the Dos2Unix tool to make the file Unix compatible.
- Variable Substitution