advertisement

Search


Sponsored Developer Resources

Atom 1.0 Feed RSS 1.0 Feed RSS 2.0 Feed


Webloggers
Login
Home




Command-line Growl Notifications

   Print.Print
Email.Email weblog link
Discuss.Discuss
Blog this.Blog this
Nitesh Dhanjani

Nitesh Dhanjani
Jun. 28, 2005 11:42 PM
Permalink

Atom feed for this author. RSS 1.0 feed for this author. RSS 2.0 feed for this author.

Growl is a “global notification system” for OS X. Applications can use the Growl framework to display notifications to the user. I use Growl with Adium, and it works wonderfully.

The Growl package (download) includes a utility called growlnotify, which can be used to display notifications using the command-line. I use the following bash script (growlexec) to run a specified command and display a notification when done:

#!/bin/bash

$*

if [ $? -eq 0 ]
then /usr/local/bin/growlnotify -m "\"$*\" done (SUCCESS)"

else /usr/local/bin/growlnotify -m "\"$*\" done (FAILED)"
fi

Here is a screen-shot of growlexec causing a Growl notification to be displayed after a successful nmap run:

image

Nitesh Dhanjani is a well known security researcher, author, and speaker. Dhanjani has been invited to talk at various information security events such as the Black Hat Briefings, RSA, Hack in the Box, Microsoft Blue Hat, and OSCON.

Return to weblogs.oreilly.com.



Weblog authors are solely responsible for the content and accuracy of their weblogs, including opinions they express, and O'Reilly Media, Inc., disclaims any and all liabililty for that content, its accuracy, and opinions it may contain.

Creative Commons License This work is licensed under a Creative Commons License.



Sponsored by:



Weblog authors are solely responsible for the content and accuracy of their weblogs, including opinions they express, and O'Reilly Media, Inc. disclaims any and all liability for that content, its accuracy, and opinions it may contain.

For problems or assistance with this site, email