Source From Here
I often need to kill a process during programming.
The way I do it now is:
How can I extract the process id automatically and kill it in the same line?
In bash, you should be able to do:
Details on its workings are as follows: