Re: at based alarm.
On Sat, 10 Feb 2018, peter@easthope.ca wrote:
Given a file named wake containing this script, an alarm can be started with at.
at -f wake 6:30
How can the xterm be started with std{in,out,err} connected there?
In the "wake" script, you could start xterm with the -e option (and
put the remainder of your "wake" script in a separate "wake-aux"
script, I guess):
$ man 1 xterm
[...]
-e program [ arguments ... ]
This option specifies the program (and its command line
arguments) to be run in the xterm window. It also sets the
window title and icon name to be the basename of the program
being executed if neither -T nor -n are given on the command
line.
NOTE: This must be the last option on the command line.
[...]
Thanks, ... Peter E.
#!/bin/sh
xterm
input=""
until [[ $input != "" ]] ; do
echo Beginning until loop.
/usr/bin/play /home/peter/ring.wav
read -n 1 -t 4 input
done
Reply to: