I'm running a minecraft server inside a screen session. I want to send a command to that screen session and get the command result back (and print it back). Can I do that without using the
screen -L option?
Demonstration inside of a bash script (obviously wrong!):
result=$(screen -S "minecraft-server" -p 0 -X stuff "list"`echo -ne '\015'`) printf "$result\n"