Which field to match on really depends on which platform you are on and which ps options you are using -- these vary rather wildly.
As such, good advice -- especially if the command name is short an cryptic, you might get accidental matches. As always, look before you dive.
The use of [a]bc is a trick to avoid having the script find and kill itself in the listing; unlike "abc", "[a]bc" does not match itself, so it avoids this suicide syndrome. There are other ways to work around that, of course. Here's one attempt.
Code:
ps -ef | awk '$9 == "a" "bc" { print $2 }' | xargs kill