- 论坛徽章:
- 0
|
有如下代码:
%Jan 23 18:30:48 2005 SHELL/5/CD:task:vt0 ip:192.168.28.7 command:sys
%Jan 23 18:30:48 2005 C/5/TRAPLOG:
1.3.6.1.4.1.2011.10.2.4.2.1(h3cCfganEventlog) configure changed:
EventIndex=4198,CommandSource=1,ConfigSource=3,ConfigDestination=2
%Jan 23 17:51:55 2005 SHELL/5/CD:task:vt0 ip:192.168.28.7 user:test command:sys
%Jan 23 17:51:58 2005 /5/PORT LINK STATUS CHANGE:
Onu: is DOWN
如果通过awk将没有时间戳的语句与上句合并
也就是成如下格式:
%Jan 23 18:30:48 2005 SHELL/5/CD:task:vt0 ip:192.168.28.7 command:sys
%Jan 23 18:30:48 2005 C/5/TRAPLOG:1.3.6.1.4.1.2011.10.2.4.2.1(h3cCfganEventlog) configure changed: EventIndex=4198,CommandSource=1,ConfigSource=3,ConfigDestination=2
%Jan 23 17:51:55 2005 SHELL/5/CD:task:vt0 ip:192.168.28.7 user:test command:sys
%Jan 23 17:51:58 2005 /5/PORT LINK STATUS CHANGE:Onu: is DOWN |
|