#! /bin/sh

# inputs
#	prompt="press ENTER key or wait a second... "
#	count=5

# output
#	keyin

keyin=0
while [ $count -ge 0 ]; do
	echo -e "\r$prompt[$count] \c"
	if tread -t 1 -e 1 > /tmp/keyin; then
		count=0
		keyin=`sed -n 1p /tmp/keyin`
	fi
		count=$(( $count - 1 ))
	done
echo ''
