从windows上传了一个脚本到Linux上执行 出现如下错误:$'\r': command not found 这是windows与Unix文本编辑的默认格式不同造成的,需要转成unix格式。 解决方法 [root@localhost ~]# yum install -y Example.sh [root@localhost ~]# dos2unix Example.sh dos2unix: converting file Example.sh to Unix format ... 本文原创地址:https://www.linuxprobe.com/shell-not-found.html 转载于:https://my.oschina.net/ssdlinux/blog/3068954