Posted on 2004-11-30
I have a very large log file and need to find all lines with a certain statement in it, there is many of them repeating, I need to get it to work with and without uniq lines.
here is a example of one of the lines I'm looking for, the key that is in each line is ( Connection refused )
30-Nov-2004 08:20:05.76 tcp_intranet Q 8 firstname.lastname@example.org rfc822;email@example.com firstname.lastname@example.org /opt/iplanet/ms5/msg-hampton/queue/tcp_intranet/005/Z60I7W00.00 <AQWIXDZTPIPXK@hongkong.com> mailsrv TCP active open: Failed connect() Error: Connection refused
I can find these lines with grep but I want to find these lines and only print the columns 5 and 6 and the Error: Connection refused