/ Published in: Bash
![](/img/icon_sav.png?v3)
A simple code to kill all process, basead on a name given like a variable
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/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
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)