什么是网站设计种类,南京做网站公司哪家好,网站开发运营推广叫什么软件,做一个网站完整的网页在Linux系统中#xff0c;运行Shell脚本#xff0c;出现了如下错误#xff1a;
one-more.sh: line 1: $\r: command not found出现这样的错误#xff0c;是因为Shell脚本在Windows系统编写时#xff0c;每行结尾是\r\n#xff0c;而在Linux系统中行每行结尾是\n#xf…在Linux系统中运行Shell脚本出现了如下错误
one-more.sh: line 1: $\r: command not found出现这样的错误是因为Shell脚本在Windows系统编写时每行结尾是\r\n而在Linux系统中行每行结尾是\n所以在Linux系统中运行脚本时会认为\r是一个字符导致运行错误。
解决方法 去除Shell脚本的\r字符
方法1
sed -i s/\r// one-more.sh方法2
dos2unix one-more.sh输出如下
dos2unix: converting file one-more.sh to Unix format ...原文 http://t.csdnimg.cn/wQlpV