window编辑脚本传到linux系统报错/bin/sh ^M:bad interpreter:NO such file or directory。

在Linux中执行脚本,异常/bin/sh ^M:bad interpreter:NO such file or directory。

原因很可能是你在windows下编辑的脚本文件,放到linux系统无法识别

 

解决方法:

用vi打开脚本文件,在命令模式下输入

esc命令模式

:set ff=unix

posted @ 2019-12-12 14:54  呼长喜  阅读(221)  评论(0编辑  收藏  举报