LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   filtering (fetchmail) log file (https://www.linuxquestions.org/questions/linux-software-2/filtering-fetchmail-log-file-4175541088/)

qrange 04-29-2015 02:40 AM

filtering (fetchmail) log file
 
I need to filter a (fetchmail) log file, so that only bottom of file, from last occurrence of 'messages for' till end is shown.
What would be simplest way of doing it?

Thanks.

qrange 04-29-2015 03:21 AM

think I found the solution:
Code:

tac fetchmail.log | sed -n '/reading message/,$p; /messages for/q' |tac


All times are GMT -5. The time now is 09:08 PM.