shell脚本内容拷贝出来 执行正常 sh执行报错
1、shell脚本test.sh内容是
find /home/feel/ -name test.txt;
find /home/feel/ -name test2.txt;
find /home/feel/ -name test3.txt;
拷贝出来,放到命令行,执行正常。

2、sh test.sh,执行报错。
①②③: command not found

3、报错原因,test.sh在windows编写,windows的某些字符和Linux不一样,导致在Linux执行失败。

4、解决方法,在Linux删除在windows创建的test.sh,创建文件test.sh,执行正常。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:115
阅读量:46
阅读量:91
阅读量:53
阅读量:128