All pastes #13651 Raw Edit

Someone

public text v1 · immutable
#13651 ·published 2005-06-07 12:49 UTC
rendered paste body
ps ax | grep $1 | grep -v grep | while read f ; do
        pid=`echo "$f" | awk '{ print $1; }'`
        echo "# $f"
        echo "kill -9 $pid" 
done

this script closes a process by substring and echo them on screen
copy paste into a file named 'q'
chmod +x ./q
then q kdm will terminate all processes with substring 'kdm'