shell取余数

备忘脚本
date取得分钟数
$(()) 运算

#execute every 5 minutes
a=`date +%M`
b=$(( $a % 5 ))
if [ $b = 0 ] ; then 
       echo "execute it"
else
       echo "Not execute"
fi

 

posted @ 2015-10-17 00:44  archoncap  阅读(3160)  评论(0编辑  收藏  举报