经过PID判断tomcat是否运行

#!/bin/bashtomcat pid=$(ps -ef | grep tomcat | grep -v grep | awk '{print $2}')bash if [ "$pid"x = "x" ]; then awk   echo tomcat is stop grep else top   echo tomcat pid is $pidps   kill -9 $pid    ech
相关文章
相关标签/搜索