Resolve shell script errors $ 'r' command not found

From the windows uploaded a script to Linux on the implementation of the following error appears: $ '\ r': command not found
this is the windows and Unix text editor default format different result, you need to turn into a unix format.

Solution
[root@localhost ~]# yum install -y Example.sh
[root@localhost ~]# dos2unix Example.sh 
dos2unix: converting file Example.sh to Unix format ...

Guess you like

Origin www.cnblogs.com/linuxprobe-sarah/p/11130316.html