/ Published in: Bash

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
