Script execution error: -bash: ./start.sh: /bin/bash^M: bad interpreter: No such file or directory

problem

After uploading the start.sh script to the linux server, the execution reported this error:Insert picture description here

the reason

It is because the format of the start script in the windows environment is not supported in the linux environment.

solve

Edit script

vim start.sh

Then,
Esc +: set ff=unix
Insert picture description here
Save and exit again!

Guess you like

Origin blog.csdn.net/qq_28822933/article/details/102934915