# 遍历出本月1号~X号的日期
#!/bin/bash
staDay=0
endDay=26
while [ ${staDay} -lt ${endDay} ]
do
Someday=`date --date=''${staDay}' days ago' +%Y-%m-%d`
echo ${Someday}
staDay=$(($staDay+1))
done
exit
#同上
BegTime=2010-08-28
EndTime=2010-08-29
BegTime=`date -d "${BegTime}" +%s`
EndTiem=`date -d "${EndTime}" +%s`
Step=60*60*24
for ((i=BegTime; i<=EndTiem; i=i+Step))
do
Someday=`date -d '1970-01-01 UTC '$i' seconds' +"%Y%m%d"`
echo ${Someday}
done