Choose or automatic continue
From WickyWiki
# usage: choose_or_wait "question" "default" "secs-to-wait"
function choose_or_wait {
question=$1
default=$2
secs=$(($3))
while [ $secs -gt 0 ]; do
echo -ne "\r$question [$default]? $secs\033[0K"
if read -s -n1 -t1 choice; then
break
fi
let secs--
done
if [ -z "${choice}" ] ; then
choice=$default
fi
echo -e "\r$question [$default]? $choice "
}
choose_or_wait "Just do it" "n" "10"