build=4444444444444 if [ "$(($build % 10))" = "4" ]; then let "build = $build + 1" fi echo $build
说明:shell四则运算要 (()) 运算号两边需要空格 if 与fi 相对应。