Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!math.lsa.umich.edu!math.lsa.umich.edu!emv From: emv@math.lsa.umich.edu (Edward Vielmetti) Newsgroups: comp.unix.shell Subject: Re: Parsing a news article with source in it Message-ID: Date: 13 Oct 90 03:58:11 GMT References: <838@redford.UUCP> <107116@convex.convex.com> Sender: usenet@math.lsa.umich.edu Organization: University of Michigan Math Dept., Ann Arbor MI. Lines: 24 In-Reply-To: tchrist@convex.COM's message of 12 Oct 90 13:42:44 GMT In article <107116@convex.convex.com> tchrist@convex.COM (Tom Christiansen) writes: In article <838@redford.UUCP> bill@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 moderator, comp.archives