Restart Script Linux


Hi I am trying to use this:

while true
java -server -Xms10G -Xmx12G -jar spongevanilla-1.12.2-7.1.0-BETA-116.jar
echo “If you want to completely stop the server process now, press Ctrl+C before the time is up!”
echo “Rebooting in:”
for i in 5 4 3 2 1
echo “$i…”
sleep 1
echo “Rebooting now!”

But I receive this:
bash: ./ /bin/sh^M: bad interpreter: No such file or directory

The same file worked a month ago. I am not a Linux/Debian pro.
Can someone help me?


Probably this:

Maybe try that command if it exists or try editing the file on a Linux machine and then re-save it. You might also want to try the other given answers on stackoverflow.

Edit: Or maybe your text editor has something like Line Endings -> Unix.


Thank you!:grinning: