#!/bin/sh #load from ds if [ $# -lt 2 ] then echo "参数小于,用法如: $0 datadate filename"; exit; fi; dt=$1; if [ "$1" = "" ] then dt=$(date +"%Y%m%d" -d " 1 days ago"); fi; cd "/day/zxjxData/ZX_DATA/DS_$dt"; [ "$3" != "" ] && bak="_BAK"; fls="$2"; #文件序列 for fs in $fls do suf=${fs##*.}; #后缀名 pre=${fs%%.*}; case $suf in "TXT") di="HX";; "dat") di="ODS";; esac; if [ "${pre:1:7}" = "DG_ZONG" -o "${pre:1:7}" = "SHzongh" ] then di="DG"; fi; tb="DS_"$pre$bak; if [ "$suf" != "TXT" ] then echo "暂时不支持除核心外的装载文件!"; exit; fi; echo "db2 load from $fs of del modified by delprioritychar coldel0x08 keepblanks replace into $tb " ; done;