转:/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保存退出

posted on 2017-08-25 11:47  happy刘艺  阅读(206)  评论(0)    收藏  举报

导航