Deutsch English Français Italiano |
<874jd32ut4.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson <Keith.S.Thompson+u@gmail.com> Newsgroups: comp.unix.shell Subject: Re: [ksh93u+m] alarm timer function Date: Mon, 18 Mar 2024 12:39:51 -0700 Organization: None to speak of Lines: 42 Message-ID: <874jd32ut4.fsf@nosuchdomain.example.com> References: <ut6vru$3iq7v$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="f97e1c3debdb8027626a4403eeee570f"; logging-data="367942"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NAjGJl7/U+7BXZYv6OFvQ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:RmamNvmcCiy4BtP3w2X49UTiA7M= sha1:pkEw7M4ZVfM4snTmj+yzIh1WaBg= Bytes: 2480 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 */