慕的地8271018
1234567891011121314151617#!/bin/bash func(){ START=$1 END=$2 awk -vstartt="$START" -vendt="$END" 'BEGIN{ startm=mktime(gensub("-", " ", "g", startt) " 0 0 0") endtm=mktime(gensub("-", " ", "g", endt) " 0 0 0") for(i=startm;i<=endtm;i+=3600*24) print strftime("%Y-%m-%d", i) }'} func "2013-10-1" "2013-10-5"