Re: how to check if screen is working

Facundo Andrés Bianco <facundo-r/[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <[email protected]>
2010/11/22 jonnexen <jonnexen-gM/[email protected]>:
> Hello,
>
> I'm gonna writing a bash install-script. There I want to make a command that
> checks if screen us running. If it's running the script should be going on.
> If not there should be an error. Any ideas?
>

if [  -n "$(screen -ls | grep 'screen on')"  ]; then
   echo "screen is running"
else
   echo "screen is off"
fi

Regards,

-- 
Facundo Andrés Bianco (Vando.)
GNUPG ID: 0x89C1B42F
omb: identi.ca/vando
ASCIIribbon.org Campaign - Against HTML email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.