背景
在linux下编辑了shell文件后移植到linux后报错: -bash: ./test.sh: /bin/sh^M: bad interpreter: No such file or director
解决方法
- 在linux下使用vi打开文件
- 查看文件格式:
:set ff
显示:ff=doc
- 设置文件个格式:
:set ff=unix
在linux下编辑了shell文件后移植到linux后报错: -bash: ./test.sh: /bin/sh^M: bad interpreter: No such file or director
:set ff
显示: ff=doc
:set ff=unix
本文标题:windows下编辑shell移植到linux后不能执行
本文链接:https://www.haomeiwen.com/subject/wgirtxtx.html
网友评论