Trying to figure something out that hopefully someone can shed some light on...
What I am trying to do is search a log file from the bottom to the up grabbing the last 10 instances on an ip (or string i specify)...
when using 'tail -xxxx /var/log/messages | grep x.x.x.x'.. this will only show results if it is in the range xxxx that I specify... which is Ok because i can keep increasing the xxxx range until i get enough results but that seems tedious and that there has to be an easier way to accomplish this..
anyone have any idea's? been searching Google for the past few hours and not finding anyway to work with grep to search from bottom up and stop when i get a certain number of hits.
Thanks!