[comp.unix.questions] rn as a batch process

packer@chrpuser.gsfc.nasa.gov (12/15/89)

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.  I tried a command
procedure (or "script", as they're known here) that simply
invoked rn and then exited with a "q", like this:

	rn
	q

but it bombed with a message "Caught a SIGSEGV--.newsrc restored",
so something's wrong with this approach. Comments?

jiii@visdc.UUCP (John E Van Deusen III) (12/17/89)

In article <610@dftsrv.gsfc.nasa.gov>
packer@chrpuser.gsfc.nasa.gov () writes:
> I would like to run "rn" as a batch process to get all the
> messages from selected newsgroups into a file or files ...

I have written a utility shell script that uses a history file and
some invocations of find(1), grep(1), xargs(1), etc., to facilitate
the one-time processing of each file from a set of News groups by a
user-specified program.

I use it to mail copies of articles in selected News groups to my
buddies who don't have News software, but it could be used for about
anything.  If you want a copy of the shar file, send an e-mail reply
to this article, and say:

Send prnews.shar

--
John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865

uunet!visdc!jiii

packer@chrpserv.gsfc.nasa.gov (Charles Packer) (12/19/89)

Thanks for the three suggestions (if I'm counting right) posted
here, and one by e-mail.  They all assume the existence of the
news files on my machine.  I have learned that said files are
on another machine, and rn ...it's not clear where rn resides.
In any case, my only access to them outside of rn would be through
anonymous FTP, and only then if I can persuade the system 
administrator to move them to the directories accessible via
anonymous FTP.  This is apparently a non-trivial matter--
not just setting protection flags on a directory.