On Fri, Jun 27, 2025 at 8:32 AM olivares33561 via users <users@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
Dear Fedora users,
I am struggling to create a script that generates a series of dates with special "+%Y.%m.%d" like the following
2025.06.01
2025.06.01
2025.06.01
2025.06.01
2025.06.02
..
..
..
2025.06.03
..
..
..
.
Through
2025.06.30
Print four dates of June 1, then June 2, all the way through to June 30
I found several examples but can't succeed to get what I want
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
From man date: "The date string format is more complex than is easily documented here but is fully described in the info documentation."
% cat sequential_dates.sh
start=2025-06-01
for i in `seq 0 5`;
do
for j in `seq 0 4` l
do
date -d "$start $i days" +%Y.%m.%d;
done
done;
-- start=2025-06-01
for i in `seq 0 5`;
do
for j in `seq 0 4` l
do
date -d "$start $i days" +%Y.%m.%d;
done
done;
George N. White III
-- _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue