procmail
[Top] [All Lists]

Re: Extract last email from an email file (mbox format)

2016-05-25 08:20:12
In article 
<CAJhTkNhhnO-TXOY-rxCQY-e7220hfwvvVNMJHzrJ9s8FS1HCiw(_at_)mail(_dot_)gmail(_dot_)com>
 you write:
Hi how can I efficiently extract the last email in a huge mbox email file?

Kind regards,

If your version of tail has the -r option as most do, this will work:

tail -r mailbox | sed -e '/^From /q' | tail -r


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>