How can I start new window in the same screen session automatically?
- by Mato
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.