Linux shell function call Sample
来源:互联网 发布:淘宝大号怎么关联小号 编辑:程序博客网 时间:2024/06/06 02:19
[hs@master Log_Data]$ cat dw_parameter_ex.sh
#!/bin/bash#99_dianz total data proc ...src_dbip=`sh /home/hs/opt/public-function/getsrcinfo.fc dbip 99_dianz`src_user=`sh /home/hs/opt/public-function/getsrcinfo.fc user 99_dianz`src_pass=`sh /home/hs/opt/public-function/getsrcinfo.fc pass 99_dianz`dw_dbip=`sh /home/hs/opt/public-function/getdwinfo.fc dbip sor`dw_user=`sh /home/hs/opt/public-function/getdwinfo.fc user sor`dw_pass=`sh /home/hs/opt/public-function/getdwinfo.fc pass sor`/usr/local/bin/mysql -h$src_dbip -u$src_user -p$src_pass -N -e"select CONCAT(ifnull(\`dianz_id\`,''),'|',ifnull(\`status\`,''),'|',ifnull(\`role\`,''),'|',ifnull(\`sid\`,''),'|',ifnull(\`uid\`,''),'|',ifnull(replace(replace(replace(\`name\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`gender\`,''),'|',ifnull(\`package_id\`,''),'|',ifnull(replace(replace(replace(\`phone\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`email\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`delivery_address\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`jd_address1\`,''),'|',ifnull(\`jd_address2\`,''),'|',ifnull(\`jd_address3\`,''),'|',ifnull(\`jd_address4\`,''),'|',ifnull(replace(replace(replace(\`jd_address_detail\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`jd_address_full\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`zip_code\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`site_id\`,''),'|',ifnull(\`dianzentry_id\`,''),'|',ifnull(\`floor\`,''),'|',ifnull(replace(replace(replace(\`ali_account\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`ali_name\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`is_pass\`,''),'|',ifnull(from_unixtime(\`add_time\`,'%Y-%m-%d %H:%i:%s'),''),'|',ifnull(\`is_new\`,''),'|',ifnull(\`money\`,''),'|',ifnull(\`overdraft\`,''),'|',ifnull(\`parent_staff_id\`,''),'|',ifnull(\`dhid\`,''),'|',ifnull(replace(replace(replace(\`notice\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`drink_notice\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`portrait\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`verified_status\`,''),'|',ifnull(\`print_verified_status\`,''),'|',ifnull(from_unixtime(\`verified_time\`,'%Y-%m-%d %H:%i:%s'),''),'|',ifnull(from_unixtime(\`print_verified_time\`,'%Y-%m-%d %H:%i:%s'),''),'|',ifnull(\`mobile_check\`,''),'|',ifnull(\`freeze_money\`,''),'|',ifnull(\`freeze_type\`,''),'|',ifnull(\`check_status\`,''),'|',ifnull(\`permit_box\`,''),'|',ifnull(replace(replace(replace(\`bank_id\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`open_location\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`open_account\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(replace(replace(replace(\`card_number\`,char(13),''),char(10),''),'|',''),''),'|',ifnull(\`timeline\`,'')) from db99huanxiao.99_dianz;" >/home/hs/opt/dw-etl/rds_qrt/real_data_dir/db99huanxiao.99_dianz_rt.dat#real_99_dianz table data download from src and upload to qrt rds.../usr/local/bin/mysql -h$dw_dbip -u$dw_user -p$dw_pass -e "use qrt;truncate table real_99_dianz;"#loop load dir file to rds /usr/local/bin/mysql -h$dw_dbip -u$dw_user -p$dw_pass -e "use qrt;load data local infile '/home/hs/opt/dw-etl/rds_qrt/real_data_dir/db99huanxiao.99_dianz_rt.dat' into table real_99_dianz fields terminated by '|' enclosed by '' lines terminated by '\n' ignore 0 lines;"
0 0
- Linux shell function call Sample
- Call Back Function C++ Sample
- Linux shell function study
- Usage sample of unix signal to handle function call with a timeout value.
- shell sample
- makefile子目录,call function, 多rules之间的独立shell
- linux shell ctrl key function
- SAP F4 function sample
- macro function sample
- jsp call shell or linux command
- linux(ubuntu) php : call to undefined function mysql_connect
- error: a host function call cannot be configured CUDA Linux
- how to call c++ function in python coding in linux?
- apply function and call function
- iPhone TCP Socket Sample Function
- one sample about recursive function
- Function.call()的用法
- RFC (Remote Function Call)
- JAVA事务
- java.lang.IllegalArgumentException: No converter found for return value of type: class
- ProgressDialog简单封装
- 【交换安全】DAI - Dynamic ARP Inspection 详解
- 10 scrapy框架解读--深入理解爬虫原理
- Linux shell function call Sample
- Tomcat 7最大并发连接数的正确修改方法
- SystemUI浅析
- Java中的Random()函数
- js登录界面判断输入的用户名和密码是否为空
- Eclipse安装PMD插件
- 多媒体_创建图片副本
- Java输入输出流笔记
- UNDERSTANDING ANDROID GRAPHICS INTERNALS -SURFACEFLINGER(V)