kill -9 ` ps -ef | grep "tomcat" | grep -v grep | awk '{printf $2};{printf " "}'` 可以放到shell脚本中,然后执行shell脚本就可以了