#!/bin/bash
#筛选分数等级
score=500
if [ $score -gt 100 ];then
echo "分数不正确"
elif [ $score -ge 80 ];then
echo "优秀"
elif [ $score -ge 60 ];then
echo "及格"
elif [ $score -ge 0 ];then
echo "不及格"
else
echo "分数不正确"
fi
2023-12-27 10:53:39
#!/bin/bash
#筛选分数等级
score=500
if [ $score -gt 100 ];then
echo "分数不正确"
elif [ $score -ge 80 ];then
echo "优秀"
elif [ $score -ge 60 ];then
echo "及格"
elif [ $score -ge 0 ];then
echo "不及格"
else
echo "分数不正确"
fi