System/Linux

Shell Script Error "/bin/bash^M: bad interpreter"

JJuno 2018. 3. 12.

증상(Symptom)

-bash: ./shellscipt.sh: /bin/bash^M: bad interpreter: No such file or directory

 

해결(Solution)

vi -b shellscript.sh

:%s/^M//g

:wq

※ ^M is typing as "Ctrl+V"+"Ctrl+M", not "Shift + 6"+"M"

728x90

댓글

💲 추천 글