Hi guys,
My /var/log/secure has a lot of entries like
Feb 22 13:45:40 spock sshd[2547]: connect refused from "192.168.1.0"
Feb 22 13:47:34 spock sshd[1407]: connect refused from "192.168.1.0"
[snip]
These lines are from the switch which does some health checks.
I want to parse the secure file in such a way that all the lines which
contains the "connect refused from 192.168.1.0" is removed and save it
to a new file like secure.new . But i want to remove also the date,
time, service,pid etc of the line. So i want to remove the WHOLE line
which contains theses keywords, how do i do that ??. Can egrep do this
(it can filter only keywords, what abt the whole line, can u do that ??)
--
Praveen Kannan.
Project Head - Knowledge Base @ ()paque Networks
Website : http://kb.opaquenetworks.com
E-mail : [EMAIL PROTECTED]
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help