Created
May 25, 2020 06:15
-
-
Save yk-st/7bfb4870c6503bd0d0d32aed8ae6bf25 to your computer and use it in GitHub Desktop.
loop_dt.sh
This file contains 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/sh | |
# | |
# YYYY-MM-DD | |
# | |
STARTDATE=2016-01-04 | |
ENDDATE=2016-01-05 | |
CURRENTDATE=$STARTDATE | |
while [ 1 ] ; do | |
# 処理 | |
echo $CURRENTDATE | |
spark-submit hoge.py --dt "${CURRENTDATE}" | |
if [ $CURRENTDATE = $ENDDATE ] ; then | |
break | |
fi | |
CURRENTDATE=`date -d "$CURRENTDATE 1day" "+%Y-%m-%d"` | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment