#!/bin/bash
#Script must be named 'reflex'
TIMEFORMAT=$'%3R Seconds'
clear
echo "Press the Enter key when you hear the tone."
sleep $((($RANDOM % 10) + 1))
echo -e "\a"
time read KEY
echo -e "\n"
echo -n "Would you like to try again? (y/n) --> "
read AGAIN
if [ $AGAIN == 'y' ] || [ $AGAIN == ];
then ./reflex
else clear && exit
fi