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

When copying a shell script from Windows to Linux and execute it:

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

Solution: Remove \r:

sed -i ‘s/\r//’ scrip_file.sh