I have this log :
Jan 26 01:05:47 server54 kernel: [41s58.6w4335] INPUT:DROP: IN=eth4 OUT= MAC=d3:ss:43:23:23:43 SRC=1.1.1.1 DST=127.0.0.0 LEN=40 TOS=0x00 PREC=0x00 TTL=254 ID=65259 PROTO=TCP SPT=53252 DPT=22 WINDOW=14600 RES=0x00 RST URGP=0
And I want to fitter out the results such that it only shows SRC and DST part with the time,showing at first, something like this:
Jan 26 01:05:47 SRC=1.1.1.1 DST=127.0.0.0
I get as far as :
tail -f -n 2 /var/log/kern.log | grep 'INPUT'
But if I add second grep, It won't work! and I want to see live result so tail should be in there.