vim kill_process.sh
-----------------------------------
if [ "$1" = "" ]; then
echo "Usage: sh $0 <processname>"
exit 0
fi
s1=`ps -ef|grep $1|grep -v "sh $1"|awk '{print $2}'`
echo "$s1"|while read line
do
if [ "$line" != "" ]; then
echo "kill pid $line"
kill $line
else
echo "the pid is NULL"
fi
done