Prompt user and use default response after a timeout 

Newsgroups: comp.unix.shell
Date: 2001-05-11 18:18:01 PST
http://groups.google.com/groups?hl=en&safe=off&th=dbad114c4f5a489e,5&seekm=3AFBDAFE.A7989309%40semax.fr#p

a portable and simple way would be :

tmout=5
trap : 15
(sleep $tmout; kill $$ &)
read x
trap - 15
echo $x

Cyrille