从windows拷贝到linux的脚本报错:未找到命令 or 语法错误

原文链接: http://www.cnblogs.com/GoQC/p/6488984.html

可能真的是命令拼错了或者参数有误,也可能是语法错误。

但是但是但是,如果之前脚本运行的好好的,没做任何改动或者仅仅改了一丁点儿。

那么脚本可能在格式上存在问题,解决方案:

安装dos2unix

sudo apt-get install dos2unix

或者 yum install dos2unix

执行:

   dos2unix **.sh

完美解决!

参考:http://blog.csdn.net/janestar/article/details/42364111

 
 

转载于:https://www.cnblogs.com/GoQC/p/6488984.html

你可能感兴趣的:(从windows拷贝到linux的脚本报错:未找到命令 or 语法错误)