#!/bin/bash
//数组统计用户家目录下文件的个数
arr=(`ls ~`)
echo ${#arr[*]}
//输入学生成绩,输出成绩等级,
[100-90]A,[90-80]B,[80-70]C,[70-60]D,[60-0]E,小于0,大于100输入不合理
read -p "输入学生成绩" score
if [ $score -ge 90 ]
then
if [ $score -le 100 ]
then
echo "A"
fi
elif [ $score -ge 80 ]
then
if [ $score -lt 90 ]
then
echo "B"
fi
elif [ $score -ge 70 ]
then
if [ $score -lt 80 ]
then
echo "C"
fi
elif [ $score -ge 60 ]
then
if [ $score -lt 70 ]
then
echo "D"
fi
elif [ $score -ge 0 ]
then
if [ $score -lt 60 ]
then
echo "E"
fi
else
echo "输入不合理"
fi