check debug filter at runShell API
add samples:terminal notifier

see
http://osxdaily.com/2012/08/03/send-an-alert-to-notification-center-from
-the-command-line-in-os-x/