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,执行正常。

阅读量:140
阅读量:130
阅读量:163
阅读量:55
阅读量:22