How would I go about extracting the "Date:" header for the latest received message in an mbox file?
Note that it's not simply an issue of grep'ing for the latest occurrence of "^Date:", since it might as well be the date from a quoted reply, not actually the latest message received.
So, probably, some proper parsing would have to be involved.
grepmail seems to be good at grinding through mbox'es intelligently, however I can't seem to find a way to achieve this seemingly trivial task with it.
Any input?
Thanks.
E: Okay, I'm officially thick. ls -l mbox would probably do. So there.
Still, I'd be very interested in a more creative approach.