Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mailrus!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.unix.questions Subject: Re: rn as a batch process, again Message-ID: <5091@buengc.BU.EDU> Date: 16 Dec 89 22:31:32 GMT References: <611@dftsrv.gsfc.nasa.gov> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.unix.questions Distribution: na Organization: Boston Univ. Col. of Eng. Lines: 36 In article <611@dftsrv.gsfc.nasa.gov> packer@chrpserv.gsfc.nasa.gov (Charles Packer) writes: >I would like to run "rn" as a batch process to get all the >messages from selected newsgroups into a file or files >so that I can FTP them over to the VAX, a programming >environment in which I am more at home. You're much better off using a sh(1) script that uses find(1) to collect the articles for you. #! /bin/sh while read group do groupdir=/usr/spool/news/`echo $group | tr . /` find $groupdir -mtime 1 -exec cat {} \; > /usr/tmp/outfile.$group done < $HOME/.copygroups where .copygroups is a file in your home directory containing the names of the groups you are interested in one per line like so: comp.unix.questions rec.arts.startrek alt.flame comp.os.vms et cetera; this is much less information than is in a .newsrc file. All of the articles written into the group's directory within the past day will be concatenated and placed in a file in the current directory with a name like "outfile.comp.unix.questions". You can change the form of this name without hurting anything, of course. Note to the experts: I know it can be made a one-liner, but who cares? --Blair "And who'd type it into the command line?"