I wish to fetch output from a screen running a Minecraft bedrock server, after executing list command to list online people on the server using
screen -X stuff 'list\n'
I wish to gain the output of this for use further in a python script as such, a file would be easy as then i can fetch everything after select few lines. I tried server logging but ended up with a bodge attempt of repeatedly attempting to remove log file, enable logging again and then executing the above command via
rm screenlog.0 screen -X log screen -X stuff 'list\n'
What I was wondering was if there is a better way to do it. Tail isnt an option as multiple things can effect stdout in the screen.