Yes; don't edit UNIX script files in Notepad. UNIX considers the carriage return, ^M, as part of the filename and fails to find the script interpreter.
Lots of ways to do it. Everyone suggests dos2unix but almost nobody has this utility. What usually works instead is
# remove carriage returns, store new file in outputfile
tr -d '\r' < myfile > outputfile
# check if output file is still okay
less outputfile
# if it is okay, overwrite myfile with it. cat lets us do it without changing permissions
cat outputfile > myfile
For many reasons the "tr" command suggested above is the best method.
Some versions of the "dos2unix" command do more than just change the line terminator (e.g. strip the high-order bit from characters).
For anybody reading this who can't find the "dos2unix" command it is often there under the alternative name "dos2ux". It is not always there at all.