Thursday, 19 April 2018

loop through a date range in shell


d=2015-12-31
while [ "$d" != 2017-01-01 ]; do
  echo $d
  d=$(date -I -d "$d + 1 day")
done