Hello,
I am noob and I was looking for this long time but didn't found answer how to do it. So what I want to do is I have minecraft server running in screen and I want to run srcipt from the same screen which would issue command each while to minecraft server.
I have tried
or with
or with
Neither of this was working first one ended up with error unable to find screen, second one wroked fine but didn't execute command and third one ended up with dc unknown command.
Any ideas how to do it? Thanks in advance for your responses.
I am noob and I was looking for this long time but didn't found answer how to do it. So what I want to do is I have minecraft server running in screen and I want to run srcipt from the same screen which would issue command each while to minecraft server.
I have tried
Code:
#!/bin/sh
while sleep 18
do
screen -r minecraft -p 0 -X stuff "dc leaderboard all $(printf '\r')"
done
Code:
echo "dc leaderboard all $(printf '\r')"
Code:
dc leaderboard all
Neither of this was working first one ended up with error unable to find screen, second one wroked fine but didn't execute command and third one ended up with dc unknown command.
Any ideas how to do it? Thanks in advance for your responses.