Hey, im trying to validate a user input and need some help. The input needs to be just a single letter. Im using a case to so this eg:
read answer
case $answer in
[A-Za-z]*) echo "OK"
;;
[0-9]*) echo "This is a number"
read answer
;;
*) echo "Please enter a letter ! !"
read answer
;;
esac
I need to stop multiple letters and repeat letters being entered. Any ideas?? Thanks for any help.