• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Reading from another terminal session (screen)

Ihaveworms

Ukfay Ancerkay
Joined
Jul 25, 2006
Messages
4,754
I am not a big linux man so I don't know all the odds and ends about it.

Here is the scenerio:
There is a server running minecraft. We used screen to start another terminal session and started the minecraft server there. So if the look at that screen, you can see all the console activity there of the minecraft server such as people chatting and stuff.

I want to write a program that parses this console information. How can I start this program in another terminal session (like our "main" session) and read the output from the console on the other session. Additionally, how do I even read this information from the terminal session. I have only had do deal with direct input from files and keyboard before so I am not sure how to read the information coming in.

Thanks.
 
Why not just pipe the output from the server to a file and read that using your program? I'm not sure if I'm understanding what you're trying to do properly though.
 
Why not just pipe the output from the server to a file and read that using your program? I'm not sure if I'm understanding what you're trying to do properly though.

This is the right way to do it. If the MC server is written remotely right, there's a way to get it to write everything to a log file (if it isn't writing there already). You then kick together some sort of Perl/Python/PHP/Ruby/Bash script to plow through the logs & do what you want with them.

While, technically, you could get the data through screen, doing so is such an ass backwards, wrong-headed way of accomplishing the stated goals, it's not worth discussing.
 
Back
Top