Script to Monitor Different IP's in the Live Logs
Dear All,
Basically I need a shell script to monitor different IP's in the live logs.
The problem is I am new to shell scripting and dont know much about the scripting.
Look at the below line, the pattern will be always like this:
[2009-02-13 15:34:53,768] DEBUG - Start! PaymentGatewayFactory - getPaymentGateway (2, 100.00,Mohit Aggarwal,1942, 1,123.50.162.248, , 9821934958)
I want to extract the different IP's from this line every time when this kind of line adds to the logs.
Once the IP's are extracted and moved to another file, I want to compare them with previously existing IP's instantly and if the count of any particular IP will be more than predefined Value that IP should be Displayed on the Screen.
Hope you got, what is the problem ?
Please do help me in this matter.....
Thanks and regards,
Akhtar Bhat.
|