Right on the heels of the pidof script comes pkill. This command has started to show up in the latest versions of Linux and Solaris, so here's a script to get the same functionality under OS X:
#!/bin/sh
for X in `ps acx | grep -i $1 | awk {'print $1'}`; do
kill $X;
done
Put this script in /usr/bin/pkill, chmod it (chmod 755 /usr/bin/pkill), and use it like this:
pkill iTunes or pkill itunes -- this script is case-insensitive.

