Path: utzoo!attcan!uunet!mcsun!ukc!acorn!camcon!mrh From: mrh@camcon.co.uk (Mark Hughes) Newsgroups: comp.binaries.ibm.pc.d Subject: Re: Automated extraction of programs from c.b.i.p postings. Message-ID: <7899@titan.camcon.co.uk> Date: 19 Jul 90 08:56:35 GMT References: <5213@castle.ed.ac.uk> Organization: Cambridge Consultants Ltd., Cambridge, UK Lines: 35 elee24@castle.ed.ac.uk (H Bruce) writes: >Does anyone have an automated way of extracting programs from the postings in >comp.binaries.ibm.pc ? >Ideally this would order the postings correctly (they sometimes appear in the >wrong order) and extract and concatenate the uuencoded text. I use the following Unix shell script with the newsreader nn (which orders the postings for me): tee /tmp/mrhuuj$$ | sed -e '/^END--cut here/,/^BEGIN--cut here/d' "$@" | uudecode cat /tmp/mrhuuj$$ | grep begin | sed 's/begin [0-9]* \([a-zA-Z0-9]*\)\..*/\1/' |\ sed -e 's/\(.*\)/\1\.hed/' >/tmp/mrhuuj$$.name cat /tmp/mrhuuj$$ | sed '/BEGIN--cut here/,$d' >`cat /tmp/mrhuuj$$.name` rm /tmp/mrhuuj$$ /tmp/mrhuuj$$.name This produces a pair of files: progname.hed and progname.zoo. The .hed file contains the text at the head of the first part of the posting, and the .zoo file is ready for transfer to a PC for unarchiving. If you read your news on a Unix machine, this should work for you, if not you might be able to get it to work with the Unix-alike tools available for PCs, but it may not be too easy. To use the above with nn, you type 'S' followed by '|uujoin', and then the letters of the postings (in the correct order!). I hope this is of use to someone, Mark PS If Ian Phillips is reading this - yes, I do remember you wrote the orignial version. I just tweaked it to produce the .hed files! -- ---------------- Eml: mrh@camcon.co.uk or mrh@camcon.uucp | Mark Hughes | Tel: +44 (0) 223 420024 Cambridge Consultants Ltd. |(Compware & CCL)| Fax: +44 (0) 223 423373 The Science Park, Milton Road, ---------------- Tlx: 81481 (CCL G) Cambridge, UK. (Me, an opinion?)