#!/bin/sh
result=`ps -ef|grep 'python **updatelaw.py'|grep -v 'grep'|awk '{print $2}'`
if [ -z "$result" ]
then
echo "Not Python Spider,But Ant would continue!Blacklist-updatelaw"
else
ps -ef|grep '**python **updatelaw.py'|grep -v 'grep'|awk '{print $2}'|xargs kill -9
echo "Killed $result"
fi
杀死指定名字线程
ps -ef|grep '**XXXXXX**'|grep -v 'grep'|awk '{print $2}'|xargs kill -9
**少一个也不行