read -p “请输入一个年份:” year
if [ “KaTeX parse error: Expected EOF, got # at position 49: …份" exit fi #̲使用正则测试变量 year 中…year” =~ [a?Z] ]];then echo “你输入的不是数字” exit fi
if [ $[year % 4] -eq 0 ] && [ [ y e a r e c h o " [year % 100] -ne 0 ];then echo " [yearecho"year年是闰年" elif [ [ y e a r e c h o " [year % 400] -eq 0 ];then echo " [yearecho"year年是闰年" else e