Xref: utzoo alt.sys.sun:3501 comp.mail.sendmail:3038 news.newusers.questions:4766 comp.unix.questions:30377 comp.unix.shell:1904 comp.unix.wizards:24875 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!mintaka!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: alt.sys.sun,comp.mail.sendmail,news.newusers.questions,comp.unix.questions,comp.unix.shell,comp.unix.wizards Subject: Re: mailing mail folders Message-ID: <1991Apr15.004857.17784@athena.mit.edu> Date: 15 Apr 91 00:48:57 GMT References: <1991Apr14.125148.27323@ssd.kodak.com> Sender: news@athena.mit.edu (News system) Followup-To: comp.unix.questions Distribution: na Organization: Massachusetts Institute of Technology Lines: 42 (Note Followup-To.) In article <1991Apr14.125148.27323@ssd.kodak.com>, dcox@ssd.kodak.com (Don Cox) writes: |> Does anyone know of a script that I can pipe into /usr/ucb/Mail that |> will mail 50 seperate articles to the recipient, rather then having to |> send it as one huge mail article? My first response is "learn perl," since I think perl will make easiest what you're trying to do. However, you might also be able to use a program (recently posted in alt.sources, I believe; see the alt.sources archives, or my READ THIS FIRST posting in comp.sources.wanted if you don't know how to get to the alt.sources archives) that splits a file up based on an arbitrary line prefix (you could split on "From " to split your mail file into separate messages). |> If I search for a 'From', it doesn't always occur at the beginning |> of a new posting. However, when it appears at the beginning of a line, then it should always occur at the beginning of a new posting, so you can search for "From " at the beginning of a line. In other words, any program that saves postings into a file in Unix mail format should be smart enough to notice when "From " appears at the beginning of a line in the middle of a posting, and when it does, should prefix that line with ">". If that doesn't work, then I'm curious to know which software you're using to save postings into a file. A way to get around the problem is to search for "From " at the beginning of a line preceded by two blank lines, but that won't solve the problem, just make it less severe, since a posting which contains that pattern will get split incorrectly. The real solution is to fix whatever software you are using so it detects "From " and prefixes it. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710