Answers for "how to kill looped process by command name"

0

how to kill looped process by command name

#!/bin/bash
while :
do
    echo "Press [CTRL+C] to stop.."
    for pid in $(ps -ef | awk '/your_process_name/ {print $2}'); do kill -9 $pid; done  
    							^keep / /	
    sleep 1
done
Posted by: Guest on January-30-2021

Code answers related to "how to kill looped process by command name"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language