Artificial intelligent assistant

Detach from screen session inside bash script I would like to run a bash scrpit while using a screen session, here is my script : #!/bin/bash for i in 1 5 18 20 do screen -S output_${i} ./run_my_program screen -d The problem is that the screen session does not detach using `screen -d` (but detach with the keyboard shortcut ctrl-a d), any suggestion ? Thanks.

You don't have to "enter" the screen session to get it to run, just use `-dm` and it will start the session in detached mode:


for i in i 5 18 20; do
screen -dm -S "output_$i" ./run_my_program
done

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f6a32715152a5949a20e85ffafdd8a6b