Re: need help on shell programming
On Sun, Mar 08, 2009 at 08:50:25PM +0100, Michael Wagner wrote:
> * Michael Pobega <pobega@gmail.com> 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
Reply to: