原!统计文件 包含关键字 数量
./statisticsUniCdrDetailInvokeTimes.sh 20180901
#! /bin/sh
first=$1
second=$2
sum=0
#while [ "$first" != "$second" ]
while [ "$first" != "20181001" ]
do
#echo detail_"$first".txt
statistics_num=`cat detail_"$first".txt |grep -E ".*300011857275.*" | wc -l`
echo detail_"$first".txt statistics_num="$statistics_num"
let sum=$sum+$statistics_num
let first=`date -d "-1 days ago ${first}" +%Y%m%d`
done
echo "sum=$sum"