If you get this error while trying to execute a bash/shell script (.sh)

/bin/bash^M: bad interpreter: no such file or directory

Then you should check the EOL (end of line) format of your script and convert that to Unix (for example, notepad++ can do it: Edit -> EOL conversion)