根据进程名强行删除进程
#!/bin/bash echo "pid_kill进程名:$1" PROC_NAME=$1 ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l` if [ $ProcNumber -le 0 ];then echo "$PROC_NAME is not run" else echo "$PROC_NAME is running.." echo "ps -ef | grep $PROC_NAME |grep -v 'grep'| awk '{print $2}' |while read pid; do kill -9 $pid; done" ps -ef | grep $PROC_NAME |grep -v 'grep'| awk '{print $2}' |while read pid; do kill -9 $pid; done fi
全世界的程序员们联合起来吧!