Last active
November 8, 2015 11:57
-
-
Save reinhrst/d3685a8f6ef41224b74b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # oneliner to print a range of dates, ending today | |
| for i in $(seq -f %.0f $(date -j -f %Y-%m-%d 2015-10-15 +%s) $((24 * 60 * 60)) $(date +%s)); do date -jf %s $i +%Y-%m-%d; done | |
| # and one in python | |
| python -c "import datetime; date = datetime.date(2015, 10, 5); days = range((datetime.date.today() - date).days); print(' '.join(str(date + datetime.timedelta(day)) for day in days))" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works on OSX.... Not by default on ubuntu