Created
February 3, 2017 01:30
-
-
Save ylt6/3f8cc68d0029560727df577e653e17a6 to your computer and use it in GitHub Desktop.
batch run command which takes 1 date argument in shell
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
START=$1 | |
END=$2 | |
curr="$START" | |
while true; do | |
<command> $curr | |
[ "$curr" \< "$END" ] || break | |
curr=$( date +%Y-%m-%d --date "$curr +1 day" ) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment