BREAKING NEWS

2012/05/17

Function Growl Notifications to Alert When Command Line Tasks Have Completed

A recent tip covered how to announce when a command line task finished by using OS X’s text-to-speech abilities. The obvious downside to that method is the sound makes it less useful to those who are using Macs in quiet environments like offices, schools, or libraries. An alternate solution is to use growlnotify to create a silent notification when a command line task has finished.


You will need the following for this to work:
Assuming both Growl and growlnotify have been installed, append growlnotify to the end of another command and use the -m flag to specify the notification message to use after the initial command has finished running. For example:
make install && growlnotify -m "Install Completed"
The Growl message “Install Completed” will appear when make install has finished running.
Growl also makes it simple to send notifications to other hosts running growl, this can be done with the -H flag and by specifying an IP address. This is helpful if you’re compiling something large on a desktop Mac and want to send the completion notification to a MacBook Air while you’re working elsewhere.
The notification icon and other details can be modified through growlnotify command as well, use the –help flag to see all the options.

Share this:

Post a Comment

 
Copyright © 2014 Deepersolids. Designed by OddThemes