Timeout


Table of Contents

getting user input with timeout 
Timed keyboard input 
Timed keyboard input 
Timeout for interactive input 
eread 
Prompt user and use default response after a timeout 
time limit for command before execution,while executing? 
time limit for command before execution,while executing? 
How to set a "timeout" for commands 

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