1 min read
bin/bash^M: bad interpreter
August 14, 2013
If you’re using windows and linux/unix and your also a system administrator who likes to script. The chances are high that you’ll get this error when executing a script on a linux/unix machine that has been made on a windows machine:
bin/bash^M: bad interpreter: No such file or directoy
^M character is a windows line break, which linux/unix can’t interpret. The solution is easy, use
dos2unix [filename] and everything should work fine.