How can I get screen to execute a command and then detach (That is, automatically in a single script without further input beyond initially starting the script)? e.g. I run myscript.sh and it automatically starts a screen session, executes a command, then detaches.
GNU Screen – How to Execute a Command and Detach
command linegnu-screenscript
Best Answer
This is an easy one:
From the Screen User's Manual: