Is there a way to get screen to echo back the session id when it creates a new window?
I am working on script in perl and I need screen to return the session id or the PID to me so I record it in an array or a hash.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What is your purpose for gathering these pids? It can be a little tricky in perl. Something like Unix::PID might help ( http://metacpan.org/pod/Unix::PID ) but I have the suspicion that your question does not address the actual problem you are trying to solve.
Since you are using
screen -dmS <somename>you can do this: