[EMAIL PROTECTED] wrote:
> PLease help restore Peace and Harmony at my house....My Lady asked me
> months ago to write a CGI script to display and search her mail archives.
> The archives are basically one huge (>5MB) MBOX file. Can somebody point
> me to a perl script that will parse an MBOX file into it's constituent
> messages, please?
No Perl, but the following awk script will split an mbox into one file
per message.
--
Glynn Clements <[EMAIL PROTECTED]>
#!/usr/bin/awk -f
BEGIN {
filenum = 0
filename = x
}
/^From / {
close(filename)
filenum++
filename = sprintf("msgs/msg-%d.txt", filenum)
}
{
print $0 >filename
}
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]