2 ms·
screen has "-X" for sending commands to remote sessions, and there's a command "stuff" for inserting text: screen -S Testing # Create a named screen for exa
by Izkata 9y ago
screen has "-X" for sending commands to remote sessions, and there's a command "stuff" for inserting text:
screen -S Testing # Create a named screen for examples:
screen -S Testing -X screen watch date # Run "watch date" in a new window on the remote session
screen -S Testing -X next # Switch back to the initial bash session
screen -S Testing -X stuff "cd /\n" # Type "cd /" and hit enter