杀死进程脚本
时间:2006-03-13 来源:redandblack007
kil_process.sh
!#/bin/bash
#kil_process.sh
current_PID=$$
ps -aux |grep "/usr/sbin/httpd" |grep -v "grep" |awk '{print $2}' >{current_PID}.txt
for pid in 'cat /tmp/${current_PID}.txt'
do
{
echo "kill -9 $pid"
kill -9 $pid
}
done
!#/bin/bash
#kil_process.sh
current_PID=$$
ps -aux |grep "/usr/sbin/httpd" |grep -v "grep" |awk '{print $2}' >{current_PID}.txt
for pid in 'cat /tmp/${current_PID}.txt'
do
{
echo "kill -9 $pid"
kill -9 $pid
}
done
相关阅读 更多 +