Skip to content

Instantly share code, notes, and snippets.

@tjluoma
Created June 9, 2014 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjluoma/9ee835f9548de69289ff to your computer and use it in GitHub Desktop.
Save tjluoma/9ee835f9548de69289ff to your computer and use it in GitHub Desktop.
while [ "$YEAR" -le "${STOP}" ]
do
# calculate and print the date
# Note that you can control the format of the date here too
DATE=`gdate --date "+${COUNT} day" '+%B %d, %Y'`
cat <<EOINPUT
* ${DATE}
* []()
*
EOINPUT
# increment the counter
COUNT=`expr ${COUNT} + 7`
# check the resulting year
YEAR=`gdate --date "+${COUNT} day" '+%Y'`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment