Created
October 14, 2022 11:03
-
-
Save geunho/f89759e1db9521aea6f9e92f18578848 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
start=20220101 | |
end=20221014 | |
while ! [[ $start > $end ]]; do | |
start=$(date -d "$start + 1 day" +%Y%m%d) | |
day=$(date -d "$start" +%d) | |
# 예시. 매월 1일은 처리 대상에서 제외 | |
if [ $day != 01 ]; then | |
echo $start | |
## DO YOUR WORK | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment