I'm trying to figure out how to make a script that will be able to send commands to a screen that will execute within whatever the screen is doing. Is this possible, and if so, how is it done? I've already tried screen -X etc, and it is not executing the commands.
Linux - Sending a command to a screen through a shell script?
scripting;shell;gnu screen
Well it depends on the commands you need to execute:If you need to execute commands in an existing screen session, you need to re-attach and execute the commands using this command line:screen -r -S <screenName> command/or/script/to/executeIf want to execute the commands inside of a new screen session, you can use this:screen -A -m -d -S <screenName> command/or/script/to/executeYou can read more about some common screen commands here: 10 Screen Command Examples to Manage Linux Terminals