Kill all processes that match a certain pattern
Coder of Salvation said
Nicely done! The 'killall' command might also be worth mentioning:
$ killall vim
But I think it'll be less specific as your method (but handy if you know for sure the process is
exactly called 'vim')
Also, maybe persons less familiar with awk could use 'cut -f 2' to get the processid.
again, great stuff
You can use pgrep/pkill for this, if it's installed on your system:
will kill all the pids matching the pattern.