[olug] Unix Tip: TASK ALERTS

Unix Guru Universe listserv at ugu.com
Thu Dec 19 19:01:00 UTC 2002


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

			      UNIX GURU UNIVERSE 
			         UNIX HOT TIP

			Unix Tip 2179 - December 19, 2002

		    http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


TASK ALERTS

Have you ever started a long 
running task, and after some time 
decide you want to be alerted 
when it finishes?

Add this to your .bashrc:

function aldo { while ps -ao pid | grep -q " ${1}$"; do sleep 1 ; done;
echo $'\a'; }

Then find the pid of a long 
running process(say 253) and 
on a different terminal:

501$ aldo 253

Will treat you to a pleasant beep when the task finishes.




--------------------------------------------------------------------------
To Subscribe:    http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe:  http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX 
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU  ADVISES THAT 
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips at ugu.com - Copyright 1994-2001
==========================================================================




More information about the OLUG mailing list