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:
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
:wq