求Linux高手给看下这个哪里错误了shell守护进程 pid=`ps auxw|grep gmsv__ |grep -v tail|grep -v ps|grep
pid=`psauxw|grepgmsv__|grep-vtail|grep-vps|grep-vgrep|grep-vkillgmsv|grep-vinit`if["$...
pid=`ps auxw|grep gmsv__ |grep -v tail|grep -v ps|grep -v grep|grep -v killgmsv|grep -v init`
if [ "$pid" = "" ]then
date=`date`
echo "Server Restart Time : $date" >> /home/gmsv/server_check.txt
/home/gmsv/dungeonclear.csh
/home/gmsv/gmsv__
done 展开
if [ "$pid" = "" ]then
date=`date`
echo "Server Restart Time : $date" >> /home/gmsv/server_check.txt
/home/gmsv/dungeonclear.csh
/home/gmsv/gmsv__
done 展开
2个回答
展开全部
1.if [ "$pid" = "" ]then就为:
if [ $pid == "" ];then
if [ ]中判读条件如果为字符串相等用==,如果判断为数字则用[ $pid -eq 125552 ]
2.if的循环结构为:
if [ ];then
======
else
======
fi
if [ $pid == "" ];then
if [ ]中判读条件如果为字符串相等用==,如果判断为数字则用[ $pid -eq 125552 ]
2.if的循环结构为:
if [ ];then
======
else
======
fi
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询