Growling your shell in OSX

My buddy at overtherailing.com posted a really cool snippet that he picked up on the internet. I am in turn posting it here:

function n {
  "$@"
  status=$?

  if [ "$status" == "0" ] ; then
    result="completed"
  else
    result="FAILED ($status)"
  fi

  growlnotify -m "Script $result" -s "$@"
}

Non-mac users, eat your heart out.

For bonus points, you can plug this sucker into prowl. I plan to make a standalone prowl equivalent for use on other *nix platforms with cURL support.

14
Sep 2009
CATEGORY

Tech

COMMENTS No Comments
TAGS

,

Comments are closed.