Return to Snippet

Revision: 38888
at January 9, 2011 14:43 by asfelix


Initial Code
#!/bin/bash

echo "Who do I have to kill?"
read program
for i in $(ps aux |grep $program | awk '{ print $2 }'); do
	kill $i;
done

Initial URL

                                

Initial Description
A simple code to kill all process, basead on a name given like a variable

Initial Title
Kill all process based on name

Initial Tags

                                

Initial Language
Bash