Under Linux code is the escape character in different platform incompatibility (use of dos2unix)

The line breaks as CRLF to LF on Linux line breaks in text files under Windows
Windows line breaks to format file \ r \ n while Unix & Linux file newline is \ n
code if passed under Linux will run up problems

So need to use dos2unix
it is to convert files to Windows format command Linux & Unix file format

AnSo :
Ubuntu:

sudo apt install dos2unix

CentOS:

yum install -y dos2unix

Use :

dos2unix 文件名

Example:

dos2unix abc.sh
Published 56 original articles · won praise 0 · Views 1133

Guess you like

Origin blog.csdn.net/Piconjo/article/details/104702580