shell生成连续天数日期
#!/bin/bash
startdate=`date -d "+0 day $1" +%Y%m%d`
enddate=`date -d "+0 day $2" +%Y%m%d`
while [[ $startdate -le $enddate ]]
do
date=$startdate
startdateother=`date -d "+0 day $date" +%Y-%m-%d`
dateother=$startdateother
echo "$dateother"
startdate=`date -d "+1 day $date" +%Y%m%d`
startdateother=`date -d "+1 day $date" +%Y-%m-%d`
echo /usr/bin/python /home/admin/bin/getappidasrandtts.py /data/trace/trace.log.$dateother /data/trace/appidasrtts.log.$dateother
/usr/bin/python /home/admin/bin/getappidasrandtts.py /data/trace/trace.log.$dateother /data/trace/appidasrtts.log.$dateother
done