Generate all dates between two dates in %Y-%m-%d-%H format in bash

Using bash I want to generate all dates between, say, 2023-11-04-00 and 2023-11-06-00 where the format is %Y-%m-%d-%H. I have tried : #!/bin/bash d=2023-11-04 while [ "$d" != 2023-11-06 ]; do d=$(date -d "$d 1 hour") u=$(date -d "$d" +’%Y-%m-%d-%H’) echo $u done It works but I get an infinite loop and can’t quite figure… Read More Generate all dates between two dates in %Y-%m-%d-%H format in bash