linux shell如何同时杀死多个进程?
PHPz
PHPz 2017-04-17 13:37:37
0
6
400

!/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的进程,那么如何同时杀死多个进程呢?

PHPz
PHPz

学习是最好的投资!

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!