Method a: vim a.sh after entering a.sh, in the foot mode, execute: set fileformat performed after = unix: x or: wq save the changes. Then you can execute ./a.sh run script.
Method two: direct execution sed -i "s / \ r //" a.sh to convert, and then you can perform ./a.sh run script.
Method three: direct execution dos2unix a.sh to convert, and then you can perform ./a.sh run script. If the failure can add busyboy
dos2unix busyboy a.sh to perform
Original Po Address: https://blog.csdn.net/stpeace/article/details/45604015