any idea on how to timeout the read statement for ksh?
for bash u can use read -t option
Cause read to time out and return failure if a complete
line of input is not read within timeout seconds. This
option has no effect if read is not reading input from
the terminal or a pipe.
Not sure, if this is the right answer. man ksh says
TMOUT If set to a positive integer in an interactive shell, it speci-
fies the maximum number of seconds the shell will wait for input
after printing the primary prompt (PS1). If the time is
exceeded, the shell exits.