> RUNNING=`ps -p ${PID} -o pid=` # see if it's running
> RUNNING=`ps -C ${SCRIPT} -o pid=` # see if other instances are running
It occurred to me that you could probably save a line and do
RUNNING=`ps -p ${PID} -C ${SCRIPT} -o pid=`
Also, you'll probably want to check and make sure that $i in the loop
is a number before attempting to kill it.
--
Alan
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list