You can grep the output of screen -list
for the name of the session you are checking for:
if ! screen -list | grep -q "myscreen"; then
# run bash script
fi
You can grep the output of screen -list
for the name of the session you are checking for:
if ! screen -list | grep -q "myscreen"; then
# run bash script
fi