Last active
February 19, 2019 06:29
-
-
Save rollin96/effc2110556332ecd2375402f43b4e86 to your computer and use it in GitHub Desktop.
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/bash | |
from_dt=${$1:-2018-03-01} | |
end_dt=${$2:-2018-03-08} | |
dt_arr=(01 08 15 22) | |
for m in $(seq -f "%02g" 3 12) | |
do | |
for d in ${dt_arr[*]} | |
do | |
end_dt="2018-$m-$d" | |
echo $from_dt $end_dt | |
from_dt=$end_dt | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
3월부터 12월까지, 각 월의 [1일, 8일, 15일, 22일]에 대해서, from_dt, end_dt를 만들어준다.
매 월 딱 4일씩만 비교하는 구조라서 정확히 7일로 떨어지진 않음.