#!/bin/sh
datadir=/home/huawei/data
ctldir=/home/huawei/shell_script
logfile=/home/huawei/once_log.getdata
source /etc/profile
cd $datadir
#ungzip the compiled file
gzip -d *$1*.gz
echo CONVERT THE CHARACTOR SET FROM GBK32 TO UTF8 >> $logfile
#convert the charactor set from GBK32 to UTF8
iconv -f GBK -t UTF8 intf_$1_ods_o_c_group_m.txt -o intf_ods_o_c_group_m.txt
iconv -f GBK -t UTF8 intf_$1_ods_o_u_grp_cust_mbr_rel.txt -o intf_ods_o_u_grp_cust_mbr_rel.txt
iconv -f GBK -t UTF8 intf_$1_ods_owe_fee_user_m.txt -o intf_ods_owe_fee_user_m.txt
iconv -f GBK -t UTF8 intf_$1_ods_p_b_yw_balance_m.txt -o intf_ods_p_b_yw_balance_m.txt
iconv -f GBK -t UTF8 intf_$1_dim_sp_code.txt -o intf_dim_sp_code.txt
iconv -f GBK -t UTF8 intf_$1_dim_user_dinner_free_volume.txt -o intf_dim_user_dinner_free_volume.txt
iconv -f GBK -t UTF8 intf_$1_dim_user_dinner.txt -o intf_dim_user_dinner.txt
iconv -f GBK -t UTF8 intf_$1_ods_o_a_account_d.txt -o intf_ods_o_a_account_d.txt
iconv -f GBK -t UTF8 intf_$1_ods_o_c_customer_d.txt -o intf_ods_o_c_customer_d.txt
iconv -f GBK -t UTF8 intf_$1_su_gprs_sms.txt -o intf_su_gprs_sms.txt
iconv -f GBK -t UTF8 intf_$1_ods_o_u_user_d.txt -o intf_ods_o_u_user_d.txt
iconv -f GBK -t UTF8 intf_$1_ods_o_u_product_d.txt -o intf_ods_o_u_product_d.txt
# get into the control forder
cd $ctldir
echo RUN THE SQLLOADER >> $logfile
#load the data file into the database
sqlldr userid=M2M/M2M@M2M control=dim_sp_code.ctl log=dim_sp_code.log bad=dim_sp_code.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=dim_user_dinner.ctl log=dim_user_dinner.log bad=dim_user_dinner.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=dim_user_dinner_free_volume.ctl log=dim_user_dinner_free_volume.log bad=dim_user_dinner_free_volume.bad direct=true row s=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_a_o_user_m.ctl log=ods_a_o_user_m.log bad=ods_a_o_user_m.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_o_c_cust.ctl log=ods_o_c_cust.log bad=ods_o_c_cust.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_o_c_group_m.ctl log=ods_o_c_group_m.log bad=ods_o_c_group_m.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_o_u_grp_cust_mbr_rel.ctl log=ods_o_u_grp_cust_mbr_rel.log bad=ods_o_u_grp_cust_mbr_rel.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_o_u_product_d.ctl log=ods_o_u_product_d.log bad=ods_o_u_product_d.bad direct=true rows=100000 errors=9999999
sqlldr userid=M2M/M2M@M2M control=ods_o_u_user_d.ctl log=ods_o_u_user_d.log bad=ods_o_u_user_d.bad direct=true rows=100000 errors=9999999
分享到:
相关推荐
第四部分 基础shell编程 第16章 shell脚本介绍 151 16.1 使用shell脚本的原因 151 16.2 脚本内容 151 16.3 运行一段脚本 152 16.4 小结 153 第17章 条件测试 154 17.1 测试文件状态 154 17.2 测试时使用逻辑操作符 ...
shell编程指南shell编程指南shell编程指南shell编程指南shell编程指南shell编程指南shell编程指南shell编程指南
shell编程-shell编程-分支语句(1) shell编程-shell编程-分支语句(2) shell编程-shell编程-循环语句(1) shell编程-shell编程-循环语句(2) Linux的shell编程(一) Linux的shell编程(二) Linux的...
本书通过各种实用的系统管理小技巧和趣味脚本代码,详尽地介绍了shell编程各个不同的方面。学完本书后,你将成为一名shell编程高手。 内容简介 本书共分五部分 ,详细介绍了SHELL编程技巧,各种UNIX命令及语法,还...
shell编程入门经典--LINUX与UNIX Shell编程指南 (中文pdf版)
Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程Shell编程
13Linux下Shell编程之While case演练 14Linux下Shell编程之While case演练 15Shell编程之函数及脚本案例讲解 16Shell编程之函数及脚本案例讲解 17Linux下Shell编程FIND、SED命令实战 18Linux下Shell编程FIND、SED...
经典Linux和unix的Shell编程,按照模板练习即可快速提高。
LINUX与UNIX SHELL编程指南
shell编程入门教程+shell脚本专家指南+UNIX.shell编程24小时教程
shell编程题目练习,练习基本的shell编程,学习脚本语言,提高效率
这是一套完整的Unix培训教材,包括Unix常用命令及SHELL编程基础与高级技巧,PDF格式,共30个文件。另有2个Word文档。包内文件清单如下: 01_Shell-文件安全与权限.PDF 02_Shell-使用find和xargs.PDF 03_Shell-...
第1章 Shell脚本编程概述 1 第2章 Linux文件系统和文本编辑器 12 第3章 正则表达式 43 第4章 sed命令和awk编程 64 第5章 文件的排序、合并和分割 105 第6章 变量和引用 133 ...第17章 bash Shell编程范例 420
1Linux下Shell编程入门及变量讲解.mp4 2Linux下Shell编程入门及变量讲解.mp4 3Shell编程企业实战菜单系列.mp4 4Shell编程企业实战菜单系列.mp4 5Linux下LAMP实战及脚本编程思路讲解.mp4 6Linux下LAMP实战及脚本编程...
shell编程--用户信息管理
Linux与Unix shell编程指南(完整高清版)Linux与Unix shell编程指南(完整高清版)Linux与Unix shell编程指南(完整高清版)Linux与Unix shell编程指南(完整高清版)Linux与Unix shell编程指南(完整高清版)Linux...
在使用windows shell扩张编程工具的过程中深切体会到windows shell技术资料的重要性,为此,根据Dino Esposito的《Visual C++ Windows Shell Programming》为蓝本,编译形成以下文字,为希望使用windows shell编程的...
LinuxShell编程基础教程.pdf
6本pdf及chm的shell 编程的书 6本pdf及chm的shell 编程的书 6本pdf及chm的shell 编程的书 6本pdf及chm的shell 编程的书 6本pdf及chm的shell 编程的书