#!/bin/sh
df -m / | awk '
/Filesystem/ { next }
200 > $4 { system("growl root only has " $4 "MB available") }
'
Or if a critical system has gone off-line:
#!/bin/sh
if ! ping -c 1 -t 10 critical.system.com; then
growl critical.system.com is off-line
fi
One last example ... if some remote site is off-line, you could have a script that Growls when the site is back on-line:
#!/bin/sh
while ! ping -c 1 -t 2 remote.site.com
do
sleep 60
done
growl remote.site.com is available
There are lots of things a Unix user/developer does not want to wait around for, but would like to know the moment it is available. Growl turns out to be a very nice tool that can satisfy this need. And yes, I know there are ways to do this using Automator, AppleScript, launchd, etc., but I'm a Unix developer and shell scripts are what come naturally to me.
[robg adds: I haven't tested this one.]

