- 论坛徽章:
- 0
|
比如如下日志,我需要过滤出第4列等于192.168.0.22的所有行,如何实现?
Apr 16 16:12:07 localhost sshd(pam_unix)[8344]: session opened for user root by root(uid=0)
Apr 16 16:16:39 192.168.0.22 sshd(pam_unix)[26583]: session opened for user root by (uid=0)
Apr 16 16:18:35 localhost nagios: Caught SIGTERM, shutting down...
Apr 16 16:18:35 localhost nagios: Successfully shutdown... (PID=74
Apr 16 16:18:38 localhost nagios: Nagios 2.8 starting... (PID=8503)
Apr 16 16:18:38 localhost nagios: LOG VERSION: 2.0
Apr 16 16:18:38 localhost nagios: Finished daemonizing... (New PID=8504)
Apr 16 17:03:15 localhost nagios: Caught SIGTERM, shutting down...
Apr 16 17:03:15 localhost nagios: Successfully shutdown... (PID=8504)
Apr 16 17:03:18 localhost nagios: Nagios 2.8 starting... (PID=933 |
|