linux 执行shell文件

执行的时候总是报错

安装软件:

yum install dos2unix

chmod +x test.sh

dos2unix test.sh

这样执行sh文件不会报一下异常,主要是因为windows中的换行和linux不一样。

欢迎指正:haizi2014@qq.com
原文地址:https://www.cnblogs.com/hcfan/p/11454822.html