start_dt="20130101";
end_dt="20131231";
for ((i=0;i<= $(($(date +%s -d "$end_dt") - $(date +%s -d "$start_dt")))/86400 |bc ;i++)) ;do
-
report_day=$(date -d "$start_dt +$i day" +%Y%m%d)
- echo $report_day
done
if [ "$1" != "" ];then
curday=$1
curtime=$1
reportime=$1
greptime=$curtime
statime=$curtime
else
curday=`date -d "30 minutes ago" +%Y%m%d`
curtime=`date -d "30 minutes ago" +%Y-%m-%d\ %H:%M:%S`
reportime=`date -d "30 minutes ago" +%Y%m%d%H%M%S|awk '{print substr($1,0,11);}'`
greptime=`echo $curtime|awk '{print $1" "substr($2,1,4);}'`
statime=`echo $curtime|awk '{print substr($2,1,4);}'`
fi