window 新建sh 文件在 linux 无法执行

在window上面新建的sh文件在linux执行失败,检查原因主要是window创建的sh文件格式是dos,linux执行的sh文件格式需要unix格式。
如何查看sh文件格式:

$ vim test.sh
> :set ff

如何修改sh文件格式:

$ vim test.sh
> :set ff=unix
> :wq
原文地址:https://www.cnblogs.com/ailhc/p/14109232.html