stats.sh
来自「The Kannel Open Source WAP and SMS gatew」· Shell 代码 · 共 36 行
SH
36 行
#!/bin/bashlogdir="var/tmp"http="public_html/web/stats"cd /home/kannel || exit 1old=""rm -f $logdir/*.logcat var/log/bearerbox_access.log$old | bin/multi-line.pl | bin/split.pl "$logdir/"# This block checks reads access.log from other machine#if [ "`/sbin/ifconfig | grep 100.204`" = "" ] ; then# other=204#else# other=205#fi#ssh <otherprefixip>.$other "cat var/log/bearerbox_access.log$old" | bin/multi-line.pl | bin/split.pl "$logdir/"for i in `(cd $logdir ; ls -1 *.log)` ; do dir=${i%%-*} file=${i#*-} ; file=${file%.log} echo "**$dir**$file**" if [ ! -d "$http/$dir" ] ; then mkdir -p "$http/$dir" fi if [ ! -d "$http/$dir/$file" ] ; then mkdir -p "$http/$dir/$file/" fi cat $logdir/$i | sort | bin/converte.pl $file | /usr/bin/webalizer -q -c etc/webalizer.conf -o $http/$dir/$file -t "$file" -donerm -f $logdir/*.log
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?