Say I want to kill every process containing the word amarok. I can print out the commands I want to execute. But how do I actually make the shell execute them. ie.
If you're using cygwin or some minimal shell that lacks killall you can just use this script:
killall
#/bin/bash ps -W | grep "$1" | awk '{print $1}' | xargs kill --
$ killall