1. read will receive a string, not an integer
2. use if statements, i.e. if [ $NUMBER -ge 0 ] && [ $NUMBER -le 49 ]; then echo "F"; elif [] && []; then echo "D"; elif...
DimaYasny
Posting Virtuoso
1,777 posts since Jan 2007
Reputation Points: 183
Solved Threads: 89
Case labels are basically simple regex's.
So you might be able to do this
[0-4]*) echo "F”;;
5*) echo "D”;;
6*) echo "C”;;
7*) echo "B”;;
[89]*) echo "A”;;
But the if/else logic is a bit safer, and more intuitive.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953