1.
执行shell命令提示 /bin/sh^M: bad interpreter: No such file or directory
出现这个提示一般是因为这个文件是在windows环境创建的, 格式与Linux不兼容。
使用以下方法进行验证:
vim Down.sh
不要对文件内容进行编辑, 使用如下命令:
:set ff?
如果出现 fileforma=dos 那么就基本可以确定是这个问题了。
解决方法:
:set fileformat=unix //编码强转为unix格式
:wq!//保存强制退出
来源:CSDN
作者:Rocoer
链接:https://blog.csdn.net/Rocoer/article/details/103492807