SyntaxFix
Write A Post
Hire A Developer
Questions
A lot of *NIX systems also have either or both pkill(1) and killall(1) which, allows you to kill processes by name. Using them, you can avoid the whole parsing ps problem.
ps