/bin/sh^M: broken interpreter: no such file or directory

The script file is saved in DOS format, converted to UNIX format with DOS2UNIX, can also be opened with vim, and converted with :set ff=unix.
Do not edit the script file under Windows, otherwise you will often encounter this kind of problem.

Code:
sed -i 's/\r$//' server.sh

You can also open the file with vim, and then execute the colon command:
Code:
:set ff=unix
:wq

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326310658&siteId=291194637