For a long time OS X didn't have `pkill`. I think it's there now with 10.8, but was missing for too many years.
I remember the one weird thing was that `killall` used to behave weirdly on commercial Unix. It would ignore its arguments and simply attempt to kill all processes. It's been a long time since I've logged into such a system, but it was then that I got used to typing `pkill`.
To echo the larger point, I've written a bunch of similar scripts in my lifetime.