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

Posted happy刘艺

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了转:/bin/bash^M: bad interpreter: No such file or directory相关的知识,希望对你有一定的参考价值。

执行一个脚本full_build.sh 时, 一直是提示我:

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

 

一般造成这个问题的原因是文本格式为Dos,不是unix造成的

通过vim打开文件,使用命令:set ff?  查看文本格式是否为unix,如果不是通过:set ff=UNIX强制转换文件格式。最后:wq保存退出

以上是关于转:/bin/bash^M: bad interpreter: No such file or directory的主要内容,如果未能解决你的问题,请参考以下文章