|
请大家看这个shell:
./procchk.csh $$ $0
procck.csh如下:
set PRCID=$1
set PRGCD=`basename $2`
#echo ${PRCID} $PRGCD
ps -ef | grep ${PRGCD} | grep -v "sh -c" | grep -v grep |grep -v ${PRCID} >/dev/null
if ($status == 0) then
echo "gfgfhgfh"
exit (1)
endif
exit (0)
请高手给解释一下! |
|