Created
May 14, 2015 15:15
-
-
Save PMaynard/55946085dd8feabfa7b6 to your computer and use it in GitHub Desktop.
Insert commands to a screened session.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a screened bash instance. | |
screen -S term01 bash | |
# Open a new terminal window and send the command 'ls\n' - the newline runs the command. | |
screen -S term01 -p 0 -X stuff "ls\n" | |
# -S <name> is the screen name | |
# -p 0 - tells it to use the first window, there can be more than one. (Default one) | |
# -X stuff '<cmd>' - Send the specified command to a running screen session. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment