I have little experience with
screen, and recently found out that it has windows. Before this, I was just creating a new session for every process I needed to run (I know, right?). However, now that I found out, I want my processes to run in a single screen instead. On startup, several processes need to be ran in windows in this screen, but I can't figure out how to run them in a specific window, creating a session if it doesn't exist. I'd like the processes to take up specific windows (8 and 9).
I know that
screen -dmS main bash will execute bash in a screen session named main, however this will always create a new session. I don't know what to run so that bash is running in window 9 in a session called
main, whether or not that session existed beforehand, with only one session
main existing after.
What command(s) do I need to run at startup to make this happen?