需求 将入库的stg层表中日指标历史数据同步到dwd层,之前的日指标数据账期从20230820到20230918
1.echo 输出变量
导入配置文件
最后的结果
#! /bin/bash
source ~/.bashrc
source ~/.bash_profile
source /etc/profile
start_date=20230820
end_date=20230918
current_date=$start_date
cd /home/asiainfo/workspace/python3/apps
while [[ $current_date -le $end_date ]]
do
python3 p_dw_d_kpi_index_value_lengthways_pbp0100034.py $current_date
echo "${current_date}已处理">> zyz_0922_2.log
current_date=$(date -d "$current_date + 1 day" +%Y%m%d)
done
标签:脚本,end,20230820,调度,echo,current,source,date,编写
From: https://www.cnblogs.com/grow-with-the-times/p/17722262.html