chmod +x restart.sh
then ./restart.sh
Also, you can't "screen command" You have to screen first, then run the command inside the screen and detach with ctrl a+d
cd ~/server
nano restart.sh
#!bin/bash
while :
do
./worldserver
sleep 0
done
chmod +x restart.sh
./restart.sh
I stepped through your process and was able to successfully run the bash script with the desired results
My worldserver is located in ~/server/
Code:cd ~/server nano restart.sh
Code:#!bin/bash while : do ./worldserver sleep 0 done
exit and save (^X)
NOTE: looks like you are using PuTTY, at this point (if using default colors) restart.sh should be greenCode:chmod +x restart.sh
Code:./restart.sh