> Could anybody show me how to use the alarm command of ksh?
> I don't quiet understand the output of alarm --man:
> # alarm --man
> Usage: alarm [-r] [varname seconds]
> 
> Knut
> 

alarm hasn't been documented because it is not working in all cases.

Here is an example of code that shows how it is supposed to work:
=======================cut here==============================
alarm -r tbar +10
tbar.alarm()
{
        printf $'\E]0;%T  %s\a' now "$PWD"
}
=======================cut here==============================

This code sets an alarm that goes off every 10 seconds.  By defining
an alarm variable with alarm, you can specify a callback function var.alarm
that will execute when the alarm expires.

In this case the title bar is updated with the current time and the
current working directory every 10 seconds.

David Korn
dgk at research.att.com

Reply via email to