Say wanted to list out all the dates in December using 01 to 31.
If you just did
|
1 2 3 4 5 6 7 8 9 10 |
$ for i in `seq 1 31`; do echo 12.$i.2017; done 12.1.2017 12.2.2017 12.3.2017 12.4.2017 12.5.2017 12.6.2017 . . . |
This would list 1 to 9 without the zero in front. To fix this do:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
$ seq -f "12.%02g.2017" 31 12.01.2017 12.02.2017 12.03.2017 12.04.2017 12.05.2017 12.06.2017 12.07.2017 12.08.2017 12.09.2017 12.10.2017 12.11.2017 12.12.2017 12.13.2017 12.14.2017 12.15.2017 12.16.2017 12.17.2017 12.18.2017 12.19.2017 12.20.2017 12.21.2017 12.22.2017 12.23.2017 12.24.2017 12.25.2017 12.26.2017 12.27.2017 12.28.2017 12.29.2017 12.30.2017 12.31.2017 |