码迷,mamicode.com
首页 > 系统相关 > 详细

Linux下执行.sh命令出现-bash: ./bin/start.sh: /bin/bash^M: bad interpreter: No such file or directory

时间:2019-03-28 13:47:43      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:回车   shift   -bash   .sh   span   image   http   .com   mamicode   

原因是 文件的格式是dos,修改为unix 就OK了

查看文件格式  用vim 打开出错的文件    按 ESC键     再按shift+冒号   输入 set  ff  回车   可以看见 该文件的格式 fileformat=dos
按shift + 冒号  输入  set ff=unix 回车 发现没反应,那就对了。 
可以按 shift + 冒号  set ff 查看  fileformat=unix 

技术图片

---------------------
原文:https://blog.csdn.net/JeffreyHv/article/details/51726600

Linux下执行.sh命令出现-bash: ./bin/start.sh: /bin/bash^M: bad interpreter: No such file or directory

标签:回车   shift   -bash   .sh   span   image   http   .com   mamicode   

原文地址:https://www.cnblogs.com/aeolian/p/10614284.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!