Here is a tiny script that can be usefull to terminate (kill -9) all the programs which contain a certain string (i.e.: kill all the running copies of ping).
#!/bin/bash
for foo in `ps aux | grep $1 | awk '{print $2}'`; do kill -9 $foo; doneJust run: matar <program name> and that’s it. They are all gone.
Leave a reply