start_date=`date -d "20200701" +"%Y%m%d"` last_date=`date -d "20200710" +"%Y%m%d"` cur_date=$start_date date_list="" while [ $cur_date -le $last_date ]; do date_list="$date_list $cur_date" cur_date=`date -d "$cur_date +1 day" +"%Y%m%d"` done for monitor_date in $date_list; do { ....... } & done wait echo "Done."