用简单的test语句来判断是否闰年
#! /bin/bash
read -p "sd " yearif [ $((year%4)) -eq 0 -a $((year%100)) -ne 0 -o $((year%400)) -eq 0 ]thenecho "是润年"elseecho "不是闰年"
fi
判断一个数是否为偶数
#! /bin/bash
read -p "sd " aif [ $a -ge 2 -a ((a%2)) -eq 0 ]
then echo "是偶数"
else echo "不是偶数"
fi
#! /bin/bash
read -p "sd " aif [ $a -ge 2 -a $((a%2)) -eq 0 ]
then echo "是偶数"
else echo "不是偶数"
fi
if [ $a -ge 90 -a $a -le 100 ]
thenecho "A "elif [ $a -ge 60 -a $a -le 89 ]thenecho "B"elif [ $a -ge 0 -a $a -le 59 ]thenecho "C"elseecho "review"
fi