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?