On Tue, 18 Jun 2002 11:05:55 -0400 (EDT) daRcmaTTeR
<[EMAIL PROTECTED]> wrote:


> #####################################
> # detecting the running process
> #####################################
> proc=`ps r|grep <process-name>`  # the "apostrophe" looking character is
>                                # NOT an apostrophe and is necessary
>                                # for the entire command with arguments
>                                # to be loaded into the variable

Mark,

This can also be done with just the "ps" command...  Here's an example of
what I use in my crontab... 

if [ -z "`/bin/ps --no-headers -j -C program`" ]; then \
/usr/bin/program; fi

HTH,
Pierre


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to