I use "pidof" for this purpose. Seems to work better,
for me at least, than searching for strings in the output
of "ps" You can discard the output of "pidof" and use the
return value. Something like shown below. Substituting the
program you want to monitor for "suck".

while pidof suck > /dev/null ; do
      sleep 60 ;
done
poff


> From: "Moore, Paul" <[EMAIL PROTECTED]>
> Cc: "'Debian Users'" <debian-user@lists.debian.org>
> Date: Wed, 21 Oct 1998 11:54:52 +0100

> Resent-Sender: [EMAIL PROTECTED]
> X-UIDL: 11591d4f6e00b8955a9c3bb0a37377d2
> 
> >From:        Peter Iannarelli[SMTP:[EMAIL PROTECTED]
> >Hello:
> >
> >Wouldn't it just be cleaner to use dial on demand (diald)
> >which would automatically bring up and/or turn down the
> >link based on idle time.
> 
> Sorry, I should have said this. Diald won't work for two main reasons.
> First, my ISP passes mail to me when I'm online (not via POP3 - I can
> use POP3, but it's not suitable for a number of complex reasons...). So
> I have to go online anyway to grab mail. Second, I want to work in a
> batch-online mode, where I get everything in one big slug (which I can
> run, for example, while I have my tea :-) and then scan it all offline.
> 
> Hope this explains better,
> Paul.
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null
> 


-- 
/*********************** Running Debian Linux ***********************
*   For God so loved the world that He gave his only begotten Son,  *
*   that whoever believes in Him should not perish...    John 3:16  *
* W. Paul Mills              *  Topeka, Kansas, U.S.A.              *
* EMAIL= [EMAIL PROTECTED]  *  WWW= http://Mills-USA.com/          *
* Bill, I was there several years ago, why would I want to go back? *
************* pgp public key on keyservers everywhere? *************/

Reply via email to