当前位置:Gxlcms >
数据库问题 >
Statistics access traffic of apache logs
Statistics access traffic of apache logs
时间:2021-07-01 10:21:17
帮助过:23人阅读
#! /bin/bash
sum=0
exec <$1
while read line ;do
size=
echo $line | awk ‘{print $10}‘
expr $size + 1 &>/dev/null
if [ $? -ne 0 ];then
continue
fi
((sum=sum+size))
done
echo "The total byes=
echo $((${sum}/1024))
"
Statistics access traffic of apache logs
标签:apach /dev/null tis echo apache sum ota ati awk