#!/usr/bin/sh
####### usage: ./check_Yuedan_adjust.sh 200803
####### what I can do: ######## how do I work :
###### who is the author: me
##### when was I written: April 09 ,2008
date
yyyymm=$1
for leixing in gprs wlan sms mon gsm
do
echo
echo "---------------------------------"
echo "..............the $leixing test is beginning....................."
hoduan_total=0
cd pwd/"$yyyymm"
for haodun in 1 2 3 4 5 6 7 8 9
do
echo
adjust=`cat pwd/"$yyyymm"/del_"$leixing"_G"$haodun".chk|awk -F, '{sumadjust=sumadjust+$2+$3}END{print sumadjust}'`
#########校验调帐程序的读入数据与读出数据是否一致。
src_adjust=`grep "success to" pwd/"$yyyymm"/getdata_"$leixing"_G"$haodun".log |awk '{sum+=$9}END{print sum}'`
#########
if [ "$src_adjust" -eq "$adjust" ]
then
current_yuedan=`awk -F = '/Records/{print "********** ",$2," #############"}' yxd_proc_"$leixing"_G"$haodun".log |awk '{sum=sum+$2}END{print sum}'`
total_yuedan=`awk '/处理话单记录总数为/{print $2}' yxd_proc_"$leixing"_G"$haodun".log`
let sub_yuedan=total_yuedan-current_yuedan
let equal=sub_yuedan-adjust
let hoduan_total=hoduan_total+equal
echo *****"G"$haodun"的月单数据比调帐数据多记录条数(月单差额-调帐差额): "$equal
else
echo "G"$haodun"组的调帐输入数据为: "$src_adjust "经过调帐处理后的数据量为: "$adjust "二者数据量不符合,请检查调帐程序"
echo
fi
done
done
阅读(1060) | 评论(0) | 转发(0) |