标签:out shel highlight webapp 进程 over grep for $2
#!/bin/bash pid=($(ps -ef | grep tomcat | egrep -v grep | awk ‘{print $2}‘)) length=${#pid[*]} if [ $length -gt 0 ] then for i in $pid do `kill -9 $i` done echo ‘kill over ...‘ fi cd /usr/local/tomcat7-starfast-web-80/webapps/ rm -rf * echo ‘clean webapps over ...‘ cd /usr/local/tomcat7-starfast-web-80/logs >catalina.out echo ‘>catalina.out over ...‘
标签:out shel highlight webapp 进程 over grep for $2
原文地址:https://www.cnblogs.com/geekdc/p/9303653.html