OT: sed script help, please

Tim Rowledge tim at rowledge.org
Tue Sep 20 02:49:27 UTC 2005


I need a sed script (to run on OS/X Tiger) that will take an exported
email file and convert it to a variant of mbox format that OS/X Mail
will import.

I didn't know until I tried just how many variations and nit-picky
hassles there could be for this apparently simple action - export email
in 'From' format (ie mbox) and import to Mail. Sheesh. What fun.

So far as I can discern I need to export as rmail format in order to
get an easily searchable message delimiter; the mbox esport seems to
not get it quite right. Did I say 'what fun' already?

Once I have an rmail file it seems to work if I convert the
#!rmail 0000000
lines to
>From foo {some date sort of stuff}
since everything after the From is ignored except that it has to be
there or the whole message or even file is ignored!

OS/X has sed sitting there and that seems like a sensible tool for
converting several umpty-bytes of email rather than trying to use my
text editor or even some Squeak script. Except that I don't know sed
and I'll bet somebody out there does and could solve this in a small
number of seconds.

Help most gratefully received.

tim
--
Tim Rowledge, tim at rowledge.org, http://www.rowledge.org/tim
Useful random insult:- The perfect personality to write software
manuals.



More information about the Squeak-dev mailing list