Parsing a news article with source in it

Edward Vielmetti emv at math.lsa.umich.edu
Sat Oct 13 13:58:11 AEST 1990


In article <107116 at convex.convex.com> tchrist at convex.COM (Tom Christiansen) writes:

   In article <838 at redford.UUCP> bill at redford.UUCP (Bill Poitras(X258)) writes:
   >What I am trying to do is pipe a news article through a shell script
   >(preferable /bin/sh) so that it parses the header, extracts the filename
   >from the "Archive: ..." line, and then writes the rest of the file,

   I'd actually feel more confortable if I had some sample input, but
   I believe this matches your spec.

Try comp.archives or comp.unix.sources as a sample spec, go for the
Archive-name: header.  Make sure you create whatever directories are
necessary along the way.

there's a program "rkive" from comp.sources.misc which does this as well,
and a few others of their ilk, but to my knowlege nothing in perl (yet).
It appears that to do it right and bullet-proof enough for automated
execution is non-trivial, that is to say not intrinsically hard but a
lot of potential error conditions which would need to be dealt with sensibly.

--Ed

Edward Vielmetti, U of Michigan math dept <emv at math.lsa.umich.edu>
moderator, comp.archives



More information about the Comp.unix.shell mailing list