shell 根据 PPID 获取 PID
PRID=`ps -ef|grep "program"|grep -v grep|sort -k2|awk '{print $2}'` if [ -z "$PRID" ] then exit 0 else ps -ef|awk '{if($3=='"$PRID"'){system("kill -9 "$2)} }' fi
PRID=`ps -ef|grep "program"|grep -v grep|sort -k2|awk '{print $2}'` if [ -z "$PRID" ] then exit 0 else ps -ef|awk '{if($3=='"$PRID"'){system("kill -9 "$2)} }' fi