After having working in UNIX enviroments for the past dozen years, when I got my new PowerBook, I was sorely dissapointed to find that there was no pidof command. Even with the Dev Tools, even with Fink, even with a week of searching Google. So I wrote my own.
#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}";
Place this in a script (/bin/pidof is a good idea) and chmod it 755 (chmod 755 /bin/pidof) (or 700 if you are paranoid). Once in place, you can find the PID number of any running program by typing (for example) pidof iTunes; if you want to kill a program, you can just type kill `pidof iTunes`.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030618114543169