I need to execute several bash scripts in background with a screen devoted to each script within byobu session.
So how to invoke a byobu window for each script like:
$byobu-multiple script1.bash script2.bash ...
Modern byobu is based on tmux, so you can simply use the tmux new-window
command.
You can do one for each command:
tmux new-window script1.bash
tmux new-window script2.bash
If you really need a one-liner you could use xargs:
echo script1.bash script2.bash | xargs --max-args=1 tmux new-window
If you have multiple byobu sessions running in parallel, you can run tmux list-sessions
to see them, and could append the tmux new-window
command with -t
to point it at a specific session.