shell取余数

时间:2015-10-17 01:45:34   收藏:0   阅读:832
备忘脚本
date取得分钟数
$(()) 运算

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

 

原文:http://www.cnblogs.com/archoncap/p/4886765.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!