« Passport | Main | Big forest fire near my house »

Tip: notify long running terminal jobs via Growl

Sometimes you need to run some script or program that will take a long time.

What I usually do is opening a new window, start the script, and then minimize or send to the back that terminal, leaving a small corner visible to serve as a status. I could glance to the visible corner and look for the prompt to see if had ended.

Now, I use this little super simple script (could also be a bash alias, probably):

 #!/bin/sh
 #
 # Runs script, and prints a notification with growl when it finishes
 #

 $*
 growlnotify -m "Script '$*' completed" -s "Background script notification" &
 # --script ends here--

My version is called n, just n. So I can type n update_mini_cpan and have a nice notification when it finishes via Growl.

Test with n ls -la if you want.

Contacts

melo@simplicidade.org (XMPP/email)
+351 302 029 050 (voice)
melopt (Skype)

IronMan challenge

Iron Man badge Are you ready to be an Iron Man? Join the challenge and find out! (what is the meaning of this little man?)

Moosaico

Junta-te!

Recent Comments

Powered by Disqus
Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.2