Urge to kill rising
08 Oct 2013Sometimes you just gotta kill something. Here’s a useful script for killing a process if it exists.
$ ps -ef | grep [p]rocess | awk '{print $2}' | xargs -r kill
The square brackets will filter out the grep command from the process list.