检查是否存在运行的脚本
#!/bin/sh
#检查是否存在test.sh
result=`ps |grep -i "test.sh" |grep -v "grep"|wc -l`
if [ ${result} -eq 0 ];then
#echo "start process..... "
test.sh
else
echo "runing....."
fi
检查是否存在运行的脚本
#!/bin/sh
#检查是否存在test.sh
result=`ps |grep -i "test.sh" |grep -v "grep"|wc -l`
if [ ${result} -eq 0 ];then
#echo "start process..... "
test.sh
else
echo "runing....."
fi