min=0
max=100
num=0
sum=0
while [ $num -lt 5 ]
do
read -p 'pls enter a int number:' a
expr $a + 1 &>/dev/null
if [ $? -ne 0 ];then
echo "your enter must be int"
exit 1
fi
if [ $a -gt 100 ];then
echo "pls enter number must less than 100"
exit 1
fi
sum=$((a+sum))
[ $max -gt $a ] && max=$a
[ $min -lt $a ] && min=$a
let num++
done
echo "sum is: $sum"
echo "min value: $max"
echo "max value :$min"