read -t 1 -n 1 echo "Press any key to continue" while [ true ] ; do read -t 3 -n 1 if [ $? = 0 ] ; then break ; else continue ; fi done