#!/bin/bash #This script is testing to see if a char class #definition works in a test echo -n please enter a y or Y: read y #this does not work #if [ $y = [yY] ] #if test $y = [yY] # then # echo you entered a y # else # echo you didn\'t enter a y # #fi #Using a char class in a case stmt works # I typically use y|Y but this one works case $y in [yY]) echo you entered a y ;; *) echo you didn\'t enter a y ;; esac