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
Unlike a regular expression, which matches anywhere within a command name, this one requires the entirety of field 9 to be exactly equivalent to the concatenated string "abc". That may or may not be what you need, again depending on how the command was invoked and on how your version of ps shows the information.