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

From ETCwiki
Jump to navigationJump to search

I had this error and was confused why-- even though i was using Windows to write my script for bash (Notepad++), I had created it originally as a .py file which set it to DOS encoding instead of utf-8.

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

solution

recreate the file and paste your original contents using VIM or some other basic text editor.

External Links