#! /bin/sh
i=0
while true
do
clear
echo $i
((i++))
read -t 1 -n 1
if [[ $? = 0 ]]
then
exit 0
fi
done