linux shell如何同时杀死多个进程?
!/bin/sh
根据进程名杀死进程
PROCESS=
ps -ef|grep GetDeviceData.py|grep -v grep|grep -v PPID|awk '{ print $2}'
for i in $PROCESS
do
echo "Kill the GetDeviceData.py process [ $i ]"
kill -9 $i
done
上面这段代码只能杀死 GetDeviceData.py的进程,那么如何同时杀死多个进程呢?
icemaze
9 years, 1 month ago