On Mon, Nov 29, 2021 at 11:19:23AM +0000, Adam Bower wrote:
On Mon, Nov 29, 2021 at 10:52:00AM +0000, Chris Green wrote:
I know I could simply use grep but that doesn't "know about" E-Mails so although it can find the specific E-Mail it can't show me the E-Mail body which is what I'm after.
I'm guessing this is just an mbox file rather than something else? However I would just add the -A and -B options to grep to add however many lines you need before and after the date search to get the rest of the email and redirect it into a file. Any more tidying required to get just the bit you want can be done in a text editor.
The E-Mails I'm searching are actually in maildir directories, not that it makes much difference.
However a lot of them are mult-ipart so I need to be able to extract the text/plain part at least.