shell脚本执⾏kettle任务脚本
#!/bin/bash
export SHELL_HOME_PATH=/home/admin/test/data-integration/xlDataMigration
export LANG=zh_CN.UTF-8
export LOGS=/home/admin/test/data-integration/data/logs
DATE=`date +"%Y%m"`
DAY=`date +"%d"`shell代码
TIME=`date +"%H%M%S"`
if [ -d "$LOGS" ];then
echo "$LOGS is OK"
else
mkdir -p $LOGS
echo "$LOGS is created"
fi
if [ -d "$LOGS/$DATE" ];then
echo "$LOGS/$BUSINESS/$DATE is OK"
else
mkdir -p $LOGS/$DATE
echo "$LOGS/$BUSINESS/$DATE is created"
fi
TIME1=`date +"%H%M%S"`
if [[ $? -eq 0 ]];then
sh /home/admin/test/data-integration/kitchen.sh -file=/home/admin/test/data-integration/xlDataMigration/personAndVillageData.ktr.kjb >>$LOGS/$DATE/$DAY/deal_01_new_data_source_00_info_$TIME1.log
echo "excute deal_01_new_data_source_00_info.sh is successful"
else
echo "excute deal_01_new_data_source_00_info.sh is error";
exit 1;
fi
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论