Re: [ksh93u+m] alarm timer function

Liste des GroupesRevenir à cu shell 
Sujet : Re: [ksh93u+m] alarm timer function
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.unix.shell
Date : 18. Mar 2024, 20:39:51
Autres entêtes
Organisation : None to speak of
Message-ID : <874jd32ut4.fsf@nosuchdomain.example.com>
References : 1
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
In ksh93u+ I'm using the built-in 'alarm' timer command.
>
$ alarm --man
Usage: alarm [-r] [varname seconds]
>
(The original 'alarm' feature may have been experimental
and not documented well, but it was nonetheless useful.)
>
Just noticed in ksh93u+m that the 'alarm' timer command
doesn't seem to be available; I now get errors like
  "alarm: not found"
and
  timer.alarm: invalid discipline function
>
Is there some substitute in ksh93u+m that will replace
that function from the original ksh? (Or something else
to do to get it working?) Or has that feature just been
abandoned in the "u+m" branch?

I know this isn't useful to you, but tcsh has a similar command called
"sched".

https://linux.die.net/man/1/tcsh

For example, `sched 09:00 echo hello` will print "hello" at 9:00.
Scheduled commands run only while the shell is waiting at a prompt for
input.  Missed commands are executed at the next prompt.

"""
This mechanism is similar to, but not the same as, the at(1) command on
some Unix systems. Its major disadvantage is that it may not run a
command at exactly the specified time. Its major advantage is that
because sched runs directly from the shell, it has access to shell
variables and other structures. This provides a mechanism for changing
one's working environment based on the time of day.
"""

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Date Sujet#  Auteur
17 Mar 24 * [ksh93u+m] alarm timer function14Janis Papanagnou
17 Mar 24 +* Re: [ksh93u+m] alarm timer function11David W. Hodgins
17 Mar 24 i`* Re: [ksh93u+m] alarm timer function10Janis Papanagnou
17 Mar 24 i +* Re: [ksh93u+m] alarm timer function2David W. Hodgins
18 Mar 24 i i`- Re: [ksh93u+m] alarm timer function1Janis Papanagnou
17 Mar 24 i `* Re: [ksh93u+m] alarm timer function7Kaz Kylheku
17 Mar 24 i  +- Re: [ksh93u+m] alarm timer function1Richard Harnden
18 Mar 24 i  `* Re: [ksh93u+m] alarm timer function5Janis Papanagnou
18 Mar 24 i   `* Re: [ksh93u+m] alarm timer function4Arti F. Idiot
18 Mar 24 i    +* Re: [ksh93u+m] alarm timer function2Janis Papanagnou
18 Mar 24 i    i`- Re: [ksh93u+m] alarm timer function1Arti F. Idiot
18 Mar 24 i    `- Re: [ksh93u+m] alarm timer function1John-Paul Stewart
18 Mar 24 `* Re: [ksh93u+m] alarm timer function2Keith Thompson
25 Mar 24  `- Re: [ksh93u+m] alarm timer function1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal