On Sun, Mar 08, 2009 at 08:50:25PM +0100, Michael Wagner wrote:
> * Michael Pobega <[email protected]> 08.03.2009
>  
> > #! /bin/sh
> > 
> > if [ $(ps aux | grep script.sh | grep -v grep) ]; then
> >  <your script here>
> 
> Hello Michael,
> 
> what about "pgrep"?
> 
> -----------------------------------------------------+
> #! /bin/bash                                         |
>                                                      |
> if [ $(pgrep -x script.sh) ]; then <script here>; fi |
> -----------------------------------------------------+
> 
> Just my 2ยข
> Michael
> 

I've never heard of pgrep before; thanks for the tip



-- 
                  http://pobega.wordpress.com
                    http://identica/pobega


-- 
To UNSUBSCRIBE, email to [email protected] 
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to