Hi All,
Need a small help. I have a log file which keeps updating for every Minute with multiple number of lines. I just want to grep few properties which has latest Date and Time to it. How do i do it?
I wanted to grep a property by name "Reloading cache with a maximum of" from the "123.log" which has some thousands of lines in it
When i use the command "cat 123.log | grep 'Reloading cache with a maximum of' " it fetches the data something like this
"2011-08-29/08:07:44.219 INFO EJB-Timer-0a6c6b1d-563b-4c3a-a756-c854ab44364e[target=jboss.j2ee:ear=ear-xxxx-xxx-xxxxx.ear,jar=xxx-xxxxx-xxx-253134.jar,name= / Reloading cache with a maximum of 10000 loads
2011-08-29/08:08:44.230 INFO EJB-Timer-0a6c6b1d-563b-4c3a-a756-c854ab44364e[target=jboss.j2ee:ear=ear-xxxx-xxx-xxxxx.ear,jar=xxx-xxxxx-xxx-253134.jar,name= / Reloading cache with a maximum of 10000 loads
2011-08-29/08:09:44.242 INFO EJB-Timer-0a6c6b1d-563b-4c3a-a756-c854ab44364e[target=jboss.j2ee:ear=ear-xxxx-xxx-xxxxx.ear,jar=xxx-xxxxx-xxx-253134.jar,name= / Reloading cache with a maximum of 10000 loads "
I always wanted my script to get the last row which has latest date and time in it.
Can someone please HELP its urgent..........