[pmmail-list] Converting folder to mbox file
Frank Winkler @home
pmmail-list@blueprintsoftwareworks.com
Sat, 05 Jan 2002 12:28:47 +0100 (CET)
On Fri, 04 Jan 2002 08:42:55 -0500 (EST), Bruce Francis wrote:
>which Unix shell are you using under OS/2? ....
I'm using Bourne Shell (sh) for some script issues ...
> (and is it currently be revised? -- all in /pub/os2/util/shell/
> on Hobbes are 1997-9-ish...)
... and my one seems to be even older :( ... but I think it should be no
problem to compile newer code if there is any ...
i:\>which sh
d:\tools\gnu\bin\sh.exe
i:\>dir d:\tools\gnu\bin\sh.exe
Volume in drive D is OS/2 APPS Serial number is E6FE:4814
Directory of D:\tools\gnu\bin\sh.exe
12-05-92 14:12 94.641 0 sh.exe
94.641 bytes in 1 file and 0 dirs 94.720 bytes allocated
1.163.527.680 bytes free
i:\>
Moreover, I'd like to do some improvement to my script ;) ... it was just a
quick and dirty hack.
On Fri, 04 Jan 2002 13:43:38 +0100 (CET), I wrote:
>So, in sh style and using the well-known UNIX tools, something like
>
> cp NUL: mbox
> for file in *.msg do
> grep "From: " $file | tr -d ':' >> mbox
> cat $file >> mbox
> echo "" >> mbox
> done
cp NUL: mbox
for file in *.msg; do
grep "^From: " $file | sed -e 's/^From: /From /'
cat $file >> mbox
echo "" >> mbox
done
(also note the forgotten semicolon)
Regards
--
----------------------------------------------------------------------------
Frank Winkler frank@consol.de
ConSol GmbH
Franziskanerstr. 38 Voice +49 89 45841.275
81669 Munich - Germany Fax +49 89 45841.189
- pmmail-list - The PMMail Dicussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com
To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com with the first
line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------