owt76
2007-04-22 11:08:47 UTC
I'm trying to make a case statement where it tests to see if a number falls into a certain range. This is what it looks like (just a portion of the code):
case $score in
[90-100]) echo "A grade"
;;
[80-89]) echo "B grade"
;;
*) echo "Very bad grade!!!"
;;
esac
I don't think I have the correct syntax for the number ranges in the case statements. I've searched and searched and could not find what the correct syntax is - can someone help?