smpser_viettel_product.sh
来源:互联网 发布:cms监控怎么改ip 编辑:程序博客网 时间:2024/05/19 02:31
#!/usr/bin/ksh
cd ${HOME}/smp_run/smpser/bin/
if [ $# = 0 ]; then
rptday=`date '+%Y%m%d'`
else
rptday=$1
fi
rptfilename=$HOME/smp_run/smpser/temp/ocs_productcum${rptday}.rpt
if [ -f ${rptfilename}.Z ]; then
echo `date '+%m-%d-%Y'` "The table ocs_rptproduct_sum had unload Finish"
exit 1
fi
if [ "-$DBSERVERTYPE" = "-INFORMIX" ]; then
echo "The DBSERVERTYPE is Informix"
echo "unload to ${rptfilename} select * from ocs_rptproduct_sum where to_char((to_date(Countdate,'%Y%m%d') + 1 units DAY) , '%Y%m%d') = '${rptday}'"|dbaccess $SMPDBNAME
fi
if [ ! -s ${rptfilename} ]; then
echo "The table ocs_rptproduct_sum is null ${rptday}"
rm $rptfilename
exit 1
fi
if [ -f $rptfilename ]; then
cat $rptfilename |awk -F'|' '{printf("%s|%s|%s|%s|%s|%s|%s\n",$2,$3,$4,$5,$6,$7,$8)}' > tempfile
mv tempfile ${rptfilename}
compress -f ${rptfilename}
echo `date '+%m-%d-%Y'` "Process table ocs_rptproduct_sum Finish"
exit 0
fi
- smpser_viettel_product.sh
- sh
- weblogstop.sh
- man sh
- stopMS01.sh
- stopAdmin.sh
- RunWebserver.sh
- 20070910sh
- .sh打包
- create_db_sybase.sh
- svn_install_script.sh
- GendaTa.sh
- mkview.sh
- mksmbpasswd.sh
- sh string
- makeFigures.sh
- ora_full_backup.sh
- ora_arch_backup.sh
- Note: This element neither has attached source nor attached Javadoc and hence no Javadoc could
- 关于const char*和char*、const char** 和char** 赋值问题
- c语言最新资料大全
- 3.2-module分析
- linux命令备忘
- smpser_viettel_product.sh
- Adempiere编译
- C++ 对象内存分布
- MongoDB 如何限制结果和分页显示
- mysql 按in条件中的字段排序
- svn http://提示svn: Unrecognized URL scheme错误
- NSUserDefault
- 类/结构体指针 描述其大小的内存位置
- 基于OSG平台的三维饼状图实现