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

"John Levine" <[email protected]> 25 May 2016 13:19:33 -0000
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
In article <CAJhTkNhhnO-TXOY-rxCQY-e7220hfwvvVNMJHzrJ9s8FS1HCiw@mail.gmail.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