본문 바로가기
카테고리 없음

linux shell생성시 다양한 date표현

by whathelllllllllllllllll 2022. 1. 13.
728x90

export NORM_EDATE="$1"

export GMAL_EDATE="$1"

export GMAL_SDATE="$(date -d "$1 - 1 day"  '+%Y%m%d')"

export NORM_SDATE="$(date -d "$1 - 1 day"  '+%Y%m')01"

export GCHO_SDATE="$(date -d "$1 - 1 day"  '+%Y%m')01"

export GCHO_EDATE="$(date -d "$1 - 1 day"  '+%Y%m')02"

export BASE_YEAR="$(date -d "$1 - 1 day"  '+%Y')"

export BASE_YR="$(date -d "$1 - 1 day"  '+%Y')"

export BASE_MM="$(date -d "$1 - 1 day"  '+%m')"

댓글