You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
254 B

#!/bin/sh
processes=$(pgrep -fa '\.exe' | cut -d " " -f 1-3)
IFS=$'\n'
for process in $processes; do
pid=$(echo $process | cut -d " " -f 1)
full_name=$(echo $process | cut -d " " -f 2-3)
printf "Killing $pid -> $full_name\n"
kill -9 $pid
done