There is a Custom Function at Brian Dunning's site: http://www.briandunning.com/cf/1064
It uses Applescript, but in the comments, someone showed a command line version. It needs a plugin that provides access to the command line such as BaseElements or ScriptMaster.
I have no experience with the custom function, but it may be worth a look.
I'm using this CustomFunction from Douglas Alder on a developer system and it works very well on a Mac, but it is a pain to get it to work on Windows machines, so it is disabled for my clients, even when they are on Macs.
It requires additional installation of Growl and users may refuse to do that. Therefor as a notification method, it becomes unreliable. Still, I'm happy to use it on the developer copy as it keeps me posted during lengthy procedures.
on 2012-01-06 14:00 brsamuel wrote
It uses Applescript, but in the comments, someone showed a command line version.
the command-line version there is also Apple-specific, so unless it offers more
flexibility than the AppleScript approach, there's not much point to it;
however i can find at least one a command-line approach for Growl/Windows,
which means one could cobble together a cross-platform approach (given the use
of a Windows command-line plug-in)
also found this: