I have a screen
instance running, and I would need to execute some code inside the screen
, and get the result out to my script.
The first part is quite easy, I just screen -S session_name -X eval 'stuff "$cmd"\015'
.
(I modified a line I found in a script)
The second part, getting out the output, is trickier. How can I get the whole output, whatever it's size?
screen -X stuff …
; a question similar to yours. – Gilles 'SO- stop being evil' May 04 '11 at 20:43stuff
, which was what I had trouble understanding. – 1ace May 05 '11 at 13:44