标签:star linux class for done highlight pre tar 展示
# 这里的例子每天作为循环,并展示当天的前一天 #!/bin/bash startDate=20160201 endDate=20160328 startSec=`date -d "$startDate" "+%s"` endSec=`date -d "$endDate" "+%s"` for((i=$startSec;i<=$endSec;i+=86400)) do current_day=`date -d "@$i" "+%Y%m%d"` one_day_ago=`date -d "$current_day yesterday" +%Y%m%d` echo "current_day:${current_day}, yesterday:${one_day_ago}" done
标签:star linux class for done highlight pre tar 展示
原文地址:https://www.cnblogs.com/zhangyanhe/p/9212449.html