I wish to check for proper user input as such (pseudo code)
userInput=""
#check until user enters 'y' OR 'Y' OR 'n' OR 'N'
while [[ "$userInput" != "[yYnN]" ]] ; do
read userInput
done
My idea is to use the []
wild card for matching but what is the proper way to accomplish this task?