Created
June 10, 2015 14:08
-
-
Save tanji/c6735f52eb6f891c6956 to your computer and use it in GitHub Desktop.
Date sequence generator
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 | |
if [ -z $1 ] | |
then | |
echo "example usage: $(basename $0) 20150401 20150530" | |
exit 1 | |
fi | |
date=$1 | |
while true | |
do | |
echo $date | |
if [ $date == $2 ] | |
then | |
break | |
fi | |
date=$(date +%Y%m%d --date="$date +1 day") | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment