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

This is caused by additional carriage returns within your script. In Windows the end of a line is denoted by CRLF (Carriage-Return, Line-Feed). In Unix-like systems, the end of a line is donated by a single LF. This means when you try to run your script, every line has an extra carriage return which in turn causes issues.

One solution to this is to strip out the extra carriage returns, which can be done via a simple sed command.
sed -i 's/{ctrl-v}{ctrl-m}//g' [file]