How can I start new window in the same screen session automatically?
Posted
by
Mato
on Super User
See other posts from Super User
or by Mato
Published on 2013-10-30T13:53:04Z
Indexed on
2013/10/30
15:58 UTC
Read the original article
Hit count: 166
I read How can I start multiple screen sessions automatically?, but I don't understand the first accepted reply:
screen -dmS "$SESSION_NAME" "$COMMAND" "$ARGUMENTS"
In my case I need to automatically create one screen session for one script, and afterwards I need to create a new window in the same session for another script. Manually, I would:
- run screen
- enter command
- CTRL+A
- CTRL+C
- enter command
- CTRL+A
- CTRL+D
How can I do this automatically in a script? A simple example would help me a lot.
Thank you for replies.
© Super User or respective owner