I have a screen session I run with a couple windows going on it that are running a couple applications that run a console in the terminal window (thus why I run them in screen).
I would like to be killing all the windows and then adding two new ones back that essentially just re-run the command to start the program up again.
Since this may be a little confusing here is what I would do if I was just trying to do this manually on the command line:
$ screen -x programs $ (Hit Control-a + \ ) $ (Hit Control-a + c) $ program1 args0 args1 #running first program again $ (Hit Control-a + c) $ program2 args0 args1 #running second program
Technically I don't even need to kill the existing windows, just stop the interactive window running. Normally I do this when in the window I just hit CTRL-D and the program stops running. Then I just run the program again.
I know there are commands so that I can attach to the existing screen session by name, I just have no idea how I could use that to send the equivalent of CTRL+D and then send another command to it.