shell整除取餘

date取得分鐘數
$(()) 運算

ide

#execute every 5 minutes
a=`date +%M`
b=$(( $a % 5 ))
if [ $b = 0 ]it

then
       echo "execute it"
else
       echo "Not execute"
ficlass

相關文章
相關標籤/搜索