📜  杀死进程 bash - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:37.210000             🧑  作者: Mango

代码示例5
this is to kill many process (mistakenly submitted) 

#!/bin/bash
while :
do
    echo "Press [CTRL+C] to stop.."
    for pid in $(ps -ef | awk '/pmemd.cuda/ {print $2}'); do kill -9 $pid; done  

    sleep 1
done