linux中 shell编程 判断服务是否运行 判断nginx是否运行中: if ps -ef|grep "nginx"|egrep -v grep >/dev/null then echo ok! else echo no! fi