PID=`jps -l | grep office |grep -v 'grep'| awk '{print $1}' | xargs`if [ "$PID" ]then echo "正在kill进程" kill -9 $PIDelse echo "没有进程需要kill"fi