标签:pat migration shell脚本 logs exit lang 脚本 shel ttl
#!/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"`
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
标签:pat migration shell脚本 logs exit lang 脚本 shel ttl
原文地址:http://www.cnblogs.com/hds-study-blogs/p/6757495.html