Skip to content

Instantly share code, notes, and snippets.

@ylt6
Created February 3, 2017 01:30
Show Gist options
  • Save ylt6/3f8cc68d0029560727df577e653e17a6 to your computer and use it in GitHub Desktop.
Save ylt6/3f8cc68d0029560727df577e653e17a6 to your computer and use it in GitHub Desktop.
batch run command which takes 1 date argument in shell
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