Shell Script Execution Kettle Task script

Source: Internet
Author: User

#!/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

Shell Script Execution Kettle Task script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.