On a remote server I have multiple screens open and I use each one for different purpose. For example the screen with the ID 'build' it is being used to compile some programs. I can open that screen anytime, using:
ssh myserver -t screen -r build
However, I 'd like to execute a command on that remote screen, directly from my host machine.
For example I 'd like to perform an
ls in the remote
I 've tried something like:
ssh myserver -t screen -r build -X ls .
but without any luck.
Any ideas? Is this even possible?
EDIT: my actual use case:
./buildSomethingOnRemoteScreen() && ./fetchTheBuiltOutputAndDoSomethingWithIt()