Is there a way (perhaps a script) how to automate this process:
petr@sova:~$ ps -ef | grep middleman
petr 18445 2312 1 12:06 pts/2 00:00:01 /home/petr/.rvm/gems/ruby-1.9.3-p362/bin/middleman
petr 18581 13621 0 12:08 pts/0 00:00:00 grep --color=auto middleman
petr@sova:~$ kill -9 18445
Unfortunately, pkill is too weak as I have to go with -9 option on kill.
-9withpkilltoo... – OrangeDog Jan 11 '13 at 17:28-KILLthan-9. What number corresponds to what signal is implementation-dependent.SIGKILLhappens to be9on Linux i386 and Linux amd64, but not necessarily everywhere. (More info here.) – Eliah Kagan Jan 11 '13 at 23:36-KILLtoo (because it makes code more readable), it should be noted thatSIGKILL = 9is specified by POSIX, so-9is pretty portable nowadays (and does not depend on kernels or architectures). – Andrea Corbellini Jan 17 '13 at 18:51