I have such bash script:
array=( \'2015-01-01\', \'2015-01-02\' )
for i in \"${array[@]}\"
do
python /home/user/executeJobs.py {i} &> /home/user/
If you're stuck with busybox date, I've found working with timestamps to be the most reliable approach:
STARTDATE="2019-12-30"
ENDDATE="2020-01-04"
start=$(date -d $STARTDATE +%s)
end=$(date -d $ENDDATE +%s)
d="$start"
while [[ $d -le $end ]]
do
date -d @$d +%Y-%m-%d
d=$(( $d + 86400 ))
done
This will output:
2019-12-30
2019-12-31
2020-01-01
2020-01-02
2020-01-03
2020-01-04
Unix timestamp don't include leap seconds, so 1 day equals always exactly 86400 seconds.