In Z shell there is a command called dseq which produces consecutive dates. For example:
$ dseq 5
2022-05-08
2022-05-09
2022-05-10
2022-05-11
2022-05-12
Is there a similar command in bash? I tried the following which gets me close to the desired output.
$ seq -f "2022-05-%g" 5
2022-05-1
2022-05-2
2022-05-3
2022-05-4
2022-05-5
Two issues:
- how can I pad the days with
0so the output contains two-digit days? - how can I start the sequence from today versus the first of the month?
Desired output should match output of $ dseq 5 above.