getting user input with timeout
Newsgroups: comp.unix.shell
Date: 1999/02/03
and it seems you could do this:
#!/bin/sh
while true
do
echo -n "[hit |ENTER| to stop startx loop]"
stty -icanon min 0 time 50
read key in
if [ ! -e $key ];then
startx
else
exit 0
fi
stty sane
done
Jim Surles