运行shell时报错:
bash:./test.sh:/bin/sh^M:bad interpreter:No such file or directory
vim test.sh,Esc+:进入编辑模式,set ff回车,看到左下角fileformat=dos,说明格式不对,set ff=unix,回车,wq保存退出执行就不报上述的错了。
运行shell时报错:
bash:./test.sh:/bin/sh^M:bad interpreter:No such file or directory
vim test.sh,Esc+:进入编辑模式,set ff回车,看到左下角fileformat=dos,说明格式不对,set ff=unix,回车,wq保存退出执行就不报上述的错了。