When using terminal-notifier, use the -group ID and -remove ID together -- otherwise, the swipe-to-notification-area gets cluttered. Alternatively, do a sleep and close it automatically.
There is an automatic way of doing this is OSX[1]. You may also want to use terminal-notifier instead of growl[2]. My experience was that the bash prompt became too slow. However, results seem to vary.
Good thing about bash script is that it works when you compile on remote Linux machine. terminal-notifier works only if you development is completely on Mac.
Popup notifications are a horrible idea, and they're a horrible idea in every OS in which they're implemented.
Especially so in MacOS X where there's already dedicated space where notificiations could choose to appear, rather than popping up. I think Growl should see if it can incorporate itself into the top-bar instead.
Growl is integrated into OS X's notification center (which provides popup notifications).
I would actually like to have the old Growl back (Notification Center is completely disabled on most of my machines because I find it horribly annoying, whenever I open it it's full of months old notifications because it does not have a proper "read item"-mechanism. In addition to that once you unload it you will never see the OS X Update notification (Oh how I hate it) ever again.)
You can also have iTerm take actions (like ringing a bell) when it finds a match for a regular expression (like username@ in your shell prompt). The advantage here is that you can be alerted even if you're ssh'd into another machine. No growl needed.
Provided script also works ssh'd into another machine. Main downside of using iTerm match is that it fires up when you scroll up/down or just do cat and that string is present. Annoying.
You should check out the various available voices, selectable with the "-v" switch. While you're at it, let it sing In The Hall Of The Mountain King for you:
say -v Cellos Dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo