Subject: Re: WANTED: Way to add delimiter to exported msgs

From: [email-masked] (Wet-Sprocket)
Date: 31 Dec 1994 03:06:39 GMT

Comes here Mr. John Moran with this opinion in the"comp.mail.pine" group in this article on 30 Dec 1994 01:10:26 GMT:

 +       I regularly use Pine's export feature to save e-mail messages to 
 +   several different subject files. I would like to then import these files 
 +   into a database. But I need to find a way to add a delimiter character or 
 +   string to the exported messages so that can be separated from each other. 
 +   Is there a way to do this in Pine?

Hmmm...when you export a set of e-mail to a same file using the append feature
each mail is separated from one another by the From: header info for that mail.

All you have to do on the databse front is to scan the specific file for From:
and take in the rest of the info into one record till it encounters the next
From: from where till the next occurence of From: would be the second record..
and so on....

But the above logic might fail when an e-mail has more than one From: header
info (probability is high) so you are better of scanning for Subject: header
as I don't think there would be two Subject: headers for one mail.

So you would start from Subject: and whatever text is there till it encounters
the next From: header will be one record and so on and so forth....

There should be a simple Perl script floating aroun' in the net that would do
this....  comp.lang.perl would be a nice start....

Good Luck!

--
      o o o o o o o . . .   _~~~__~~~~~~~~~~~~~~~~\_ _~~~~~~~~~~~~~~~\_
    o      _____            |  /__                 | | Compt. Svcs.  |
  .][__n_n_|DD[  ====_____  |  __/ riram NCV       | | Temple Univ.  |
 >(________|__|_[_________]_|______________________|_|_______________|_
 _/oo OOOOO oo`  ooo   ooo  'o^o^o            o^o^o` 'o^o         o^o`
========================================================================
Talk about me doing the talking for others, esp. My Employers!!
Mac*CHAT List Moderator.

---

From: Dan Schlitt <[email-masked]>
Date: Sat, 31 Dec 1994 11:51:51 -0500 (EST)

Not From:, just From -- The From: header line can be anywhere in the headers.

-- 

Dan Schlitt                           School of Engineering Computer Systems
[email-masked]        City College of New York
(212)650-6760                         New York, NY 10031

---

From: Andrew Sweger <[email-masked]>
Date: Sat, 31 Dec 1994 13:14:02 -0800 (PST)

> Not From:, just From -- The From: header line can be anywhere in the headers.

Try: grep '^From ' exportedfile

> >   [snip]