-bash: ./copycat: /bin/bash^M: bad interpreter:
It looks like a file coming from Windows: the ^M sequence stats for "carriage return" plus "newline" control characters, that is the sequence \r\n in Unix. You have to strip away these control character. One way is by the dos2unix command:
or you can use sed in this way
sed -i 's/^M//g' copycat
where you type ^M by pressing Ctrl-V and Ctrl-M in sequence. Hope this will help.