I am trying to get all the dates that fall between a start and end date. This is what I did
start="2022-03-02" end="2022-03-07" while [[ $start < $end ]] do echo "$start" start=$(date -d "$start + 1 day" +"%Y-%m-%d") done This results in an error
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format] What is it I am missing?
2022-03-02 2022-03-03 2022-03-04 2022-03-05 2022-03-06date; what doesdate --versionreport?startto something likeloopdate. Most people will expect a start value to be fixed.