Is there any command-line utility that sends notifications to Notification Center? Something similar to Growl's growlnotify
.
Check out terminal-notifier on GitHub.
In Maverics it's possible to trigger a notification from an Apple Script, but not sure if it works in Mountain Lion:
display notification "Hello!"
I made a simple command-line script to pass parameters to an apple script. One-line install:
echo -e '#!/bin/bash\n/usr/bin/osascript -e "display notification \"$*\""'|sudo -s "cd /usr/local/bin;tee notify&&chmod +x notify"
Will output code below to /usr/local/bin (must exist) and add executable flag. Make sure /usr/local/bin is in your $PATH.
#! /bin/bash
/usr/bin/osascript -e "display notification \"$*\""
Now to display a notification:
notify "Lorem ipsum dolor sit amet"
sleep 5 ; notify "Slow command finished"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With