- 论坛徽章:
- 0
|
本帖最后由 jlds123 于 2013-11-04 16:17 编辑
首先有一个配置文件A如下:
- LogFile="/logs/localhost_20130514.log"
- # Enter the log file type you want to analyze.
- # Possible values:
- # W - For a web log file
- # S - For a streaming log file
- # M - For a mail log file
- # F - For a ftp log file
- # Example: W
复制代码 参数文件B如下:- localhost_20130616.log
- localhost_20130617.log
- localhost_20130618.log
- localhost_20130619.log
- localhost_20130620.log
- localhost_20130621.log
- localhost_20130622.log
- localhost_20130623.log
- localhost_20130624.log
- localhost_20130625.log
- localhost_20130626.log
- localhost_20130627.log
- localhost_20130628.log
- localhost_20130629.log
- localhost_20130630.log
- localhost_20130701.log
- localhost_20130702.log
- localhost_20130703.log
- localhost_20130704.log
- localhost_20130705.log
- localhost_20130706.log
复制代码 执行- perl /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=localhost
复制代码 输出如下:- Jumped lines in file: 677730
- Found 677730 already parsed records.
- Parsed lines in file: 0
- Found 0 dropped records,
- Found 0 comments,
- Found 0 blank records,
- Found 0 corrupted records,
- Found 0 old records,
- Found 0 new qualified records.
复制代码 想实现效果:
每执行一次上面perl命令,执行完成后,配置文件A中的localhost_20130514.log循环替换成参数文件B中的每一行,然后执行perl命令
实际上B文件可能很多行,所以需要写个脚本 |
|