echo "yd_new"
source /etc/profile
#first run changed download shell
sh ./changed/download.sh
#export NLS_LANG=AMERICAN_AMERICA.UTF8
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
YYYY=`date "+%Y"`
MM=`date "+%m"`
#DD=`date "+%d"`
DD=`date -d "1 days ago" "+%d"`
get_file="*$YYYY$MM$DD*.gz"
day_path="$YYYY$MM$DD"
GZ_YDWX_BSC="HEB_HEB_MOBILE_OMC_vendor_RM_BSC_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_BTS="HEB_HEB_MOBILE_OMC_vendor_RM_BTS_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_CELL="HEB_HEB_MOBILE_OMC_vendor_RM_Cell_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_EMS="HEB_HEB_MOBILE_OMC_vendor_RM_EMS_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_ENODEB="HEB_HEB_MOBILE_OMC_vendor_RM_eNodeB_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_EUTRANCELL="HEB_HEB_MOBILE_OMC_vendor_RM_Eutrancell_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_GGSN="HEB_HEB_MOBILE_OMC_vendor_RM_GGSN_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_GMSC="HEB_HEB_MOBILE_OMC_vendor_RM_MSC_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_HLR="HEB_HEB_MOBILE_OMC_vendor_RM_HLR_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_HSS_BE="HEB_HEB_MOBILE_OMC_vendor_RM_HSS-Be_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MGW="HEB_HEB_MOBILE_OMC_vendor_RM_MGW_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MME="HEB_HEB_MOBILE_OMC_vendor_RM_MME_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MSCSERVER="HEB_HEB_MOBILE_OMC_vendor_RM_MSCServer_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_NODEB="HEB_HEB_MOBILE_OMC_vendor_RM_Nodeb_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_PGW="HEB_HEB_MOBILE_OMC_vendor_RM_PGW_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_RNC="HEB_HEB_MOBILE_OMC_vendor_RM_RNC_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_SERVINGGW="HEB_HEB_MOBILE_OMC_vendor_RM_SGW_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_SGSN="HEB_HEB_MOBILE_OMC_vendor_RM_SGSN_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_UTRANCELL="HEB_HEB_MOBILE_OMC_vendor_RM_Utrancell_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_SGW="HEB_HEB_MOBILE_OMC_vendor_RM_SGW_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MSC="HEB_HEB_MOBILE_OMC_vendor_RM_MSC_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MGWGEI_CONFIG="HEB_HEB_MOBILE_OMC_vendor_RM_MGW_CARD_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MGWGEI_PORT="HEB_HEB_MOBILE_OMC_vendor_RM_MGW_PORT_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MSCNODE_CONFIG="HEB_HEB_MOBILE_OMC_vendor_RM_MSCServer_CARD_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDWX_MSCSIM_PORT="HEB_HEB_MOBILE_OMC_vendor_RM_MSCServer_PORT_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDHX_GMGW_CARD="HEB_HEB_MOBILE_OMC_vendor_RM_GMGW_CARD_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDHX_GMGW_PORT="HEB_HEB_MOBILE_OMC_vendor_RM_GMGW_PORT_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDHX_GMSCSERVER_CARD="HEB_HEB_MOBILE_OMC_vendor_RM_GMSCServer_CARD_1440_$YYYY$MM$DD*.tar.gz"
GZ_YDHX_GMSCSERVER_PORT="HEB_HEB_MOBILE_OMC_vendor_RM_GMSCServer_PORT_1440_$YYYY$MM$DD*.tar.gz"
YDWX_BSC="127-MOBILE-BSC-$YYYY$MM$DD*.csv"
YDWX_BTS="127-MOBILE-BTS-$YYYY$MM$DD*.csv"
YDWX_CELL="127-MOBILE-Cell-$YYYY$MM$DD*.csv"
YDWX_EMS="127-MOBILE-EMS-$YYYY$MM$DD*.csv"
YDWX_ENODEB="127-MOBILE-eNodeB-$YYYY$MM$DD*.csv"
YDWX_EUTRANCELL="127-MOBILE-Eutrancell-$YYYY$MM$DD*.csv"
YDWX_GGSN="127-MOBILE-GGSN-$YYYY$MM$DD*.csv"
YDWX_GMSC="127-MOBILE-MSC-$YYYY$MM$DD*.csv"
YDWX_HLR="127-MOBILE-HLR-$YYYY$MM$DD*.csv"
YDWX_HSS_BE="127-MOBILE-HSS-Be-$YYYY$MM$DD*.csv"
YDWX_MGW="127-MOBILE-MGW-$YYYY$MM$DD*.csv"
YDWX_MME="127-MOBILE-MME-$YYYY$MM$DD*.csv"
YDWX_MSCSERVER="127-MOBILE-MSCServer-$YYYY$MM$DD*.csv"
YDWX_NODEB="127-MOBILE-Nodeb-$YYYY$MM$DD*.csv"
YDWX_PGW="127-MOBILE-PGW-$YYYY$MM$DD*.csv"
YDWX_RNC="127-MOBILE-RNC-$YYYY$MM$DD*.csv"
YDWX_SERVINGGW="127-MOBILE-SGW-$YYYY$MM$DD*.csv"
YDWX_SGSN="127-MOBILE-SGSN-$YYYY$MM$DD*.csv"
YDWX_UTRANCELL="127-MOBILE-Utrancell-$YYYY$MM$DD*.csv"
YDWX_SGW="127-MOBILE-SGW-$YYYY$MM$DD*.csv"
YDWX_MSC="127-MOBILE-MSC-$YYYY$MM$DD*.csv"
YDWX_MGWCARD_CONFIG="127-MOBILE-MGW_CARD-$YYYY$MM$DD*.csv"
YDWX_MGWCARD_PORT="127-MOBILE-MGW_PORT-$YYYY$MM$DD*.csv"
YDWX_MSCNODE_CONFIG="127-MOBILE-MSCServer_CARD-$YYYY$MM$DD*.csv"
YDWX_MSCSIM_PORT="127-MOBILE-MSCServer_PORT-$YYYY$MM$DD*.csv"
YDHX_GMGW_CARD="127-MOBILE-GMGW_CARD-$YYYY$MM$DD*.csv"
YDHX_GMGW_PORT="127-MOBILE-GMGW_PORT-$YYYY$MM$DD*.csv"
YDHX_GMSCSERVER_CARD="127-MOBILE-GMSCServer_CARD-$YYYY$MM$DD*.csv"
YDHX_GMSCSERVER_PORT="127-MOBILE-GMSCServer_PORT-$YYYY$MM$DD*.csv"
echo $get_file
basepath=$(cd `dirname $0`; pwd)
cd $basepath
rm *.csv *.gz *.bad -f
ftp -inv 133.96.84.156 <<EOF
user hanjia rs4hj&#
bin
lcd $basepath
cd /data/esbftp/resource/HEB/MOBILE
cd $day_path
mget $get_file
bye
EOF
echo "cat tar file."
cat $GZ_YDWX_BSC |tar xz
cat $GZ_YDWX_BTS |tar xz
cat $GZ_YDWX_CELL |tar xz
cat $GZ_YDWX_EMS |tar xz
cat $GZ_YDWX_ENODEB |tar xz
cat $GZ_YDWX_EUTRANCELL |tar xz
cat $GZ_YDWX_GGSN |tar xz
cat $GZ_YDWX_GMSC |tar xz
cat $GZ_YDWX_HLR |tar xz
cat $GZ_YDWX_HSS_BE |tar xz
cat $GZ_YDWX_MGW |tar xz
cat $GZ_YDWX_MME |tar xz
cat $GZ_YDWX_MSCSERVER |tar xz
cat $GZ_YDWX_NODEB |tar xz
cat $GZ_YDWX_PGW |tar xz
cat $GZ_YDWX_RNC |tar xz
cat $GZ_YDWX_SERVINGGW |tar xz
cat $GZ_YDWX_SGSN |tar xz
cat $GZ_YDWX_UTRANCELL |tar xz
cat $GZ_YDWX_SGW |tar xz
cat $GZ_YDWX_MSC |tar xz
cat $GZ_YDWX_MGWGEI_CONFIG |tar xz
cat $GZ_YDWX_MGWGEI_PORT |tar xz
cat $GZ_YDWX_MSCNODE_CONFIG |tar xz
cat $GZ_YDWX_MSCSIM_PORT |tar xz
cat $GZ_YDHX_GMGW_CARD |tar xz
cat $GZ_YDHX_GMGW_PORT |tar xz
cat $GZ_YDHX_GMSCSERVER_CARD |tar xz
cat $GZ_YDHX_GMSCSERVER_PORT |tar xz
echo "tar over."
sh sqlldr.sh $YDWX_BSC YDWX_BSC
sh sqlldr.sh $YDWX_BTS YDWX_BTS
sh sqlldr.sh $YDWX_CELL YDWX_CELL
sh sqlldr.sh $YDWX_EMS YDWX_EMS
sh sqlldr.sh $YDWX_ENODEB YDWX_ENODEB
sh sqlldr.sh $YDWX_EUTRANCELL YDWX_EUTRANCELL
sh sqlldr.sh $YDWX_GGSN YDWX_GGSN
sh sqlldr.sh $YDWX_GMSC YDWX_GMSC
sh sqlldr.sh $YDWX_HLR YDWX_HLR
sh sqlldr.sh $YDWX_HSS_BE YDWX_HSS_BE
sh sqlldr.sh $YDWX_MGW YDWX_MGW
sh sqlldr.sh $YDWX_MME YDWX_MME
sh sqlldr.sh $YDWX_MSCSERVER YDWX_MSCSERVER
sh sqlldr.sh $YDWX_NODEB YDWX_NODEB
sh sqlldr.sh $YDWX_PGW YDWX_PGW
sh sqlldr.sh $YDWX_RNC YDWX_RNC
sh sqlldr.sh $YDWX_SERVINGGW YDWX_SERVINGGW
sh sqlldr.sh $YDWX_SGSN YDWX_SGSN
sh sqlldr.sh $YDWX_UTRANCELL YDWX_UTRANCELL
sh sqlldr.sh $YDWX_SGW YDWX_SGW
sh sqlldr.sh $YDWX_MSC YDWX_MSC
sh sqlldr.sh $YDWX_MGWCARD_CONFIG YDWX_MGWCARD_CONFIG
sh sqlldr.sh $YDWX_MGWCARD_PORT YDWX_MGWCARD_PORT
sh sqlldr.sh $YDWX_MSCNODE_CONFIG YDWX_MSCNODE_CONFIG
sh sqlldr.sh $YDWX_MSCSIM_PORT YDWX_MSCSIM_PORT
sh sqlldr.sh $YDHX_GMGW_CARD YDWX_GMGW_CARD
sh sqlldr.sh $YDHX_GMGW_PORT YDWX_GMGW_PORT
sh sqlldr.sh $YDHX_GMSCSERVER_CARD YDWX_GMSCSERVER_CARD
sh sqlldr.sh $YDHX_GMSCSERVER_PORT YDWX_GMSCSERVER_PORT
#run sqlplus exec procedure
sqlplus nrms_jk/Hbnrms_jk2016@nrms <<EOF
set echo on
set timing on
set time on
exec nrms_tb.P_TB_YDWX();
quit
EOF
find *.csv -mtime +2 -exec rm -f {} \;
find *.gz -mtime +2 -exec rm -f {} \;
find *.log -mtime +2 -exec rm -f {} \;
find *.bad -mtime +2 -exec rm -f {} \;
2019-06-26 shell 脚本
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 转:https://blog.csdn.net/sinat_36521655/article/details/79...
- 来源 https://blog.csdn.net/wave_1102/article/details/470559...
- 1、变量+字符串+数组 变量 定义变量的原则: 字符串 单引号和双引号都区别:单引号不支持转义和引入变量,双引号支...