tomcat多次连续启动,现在通过脚本,一次执行,全部停掉
[root@YFDT-DEM1701-EPMDM ~]# cat tomcat_pid.sh #!/bin/bash cat /dev/null >pid_tomcat.file jps -v | grep /root/tomcat7/conf | sed -r "s/(^[0-9]{2,5})s.*/1/g">pid_tomcat.file while read TomcatPID do kill -9 $TomcatPID done<pid_tomcat.file rm -f pid_tomcat.file