Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 +2.11; site dcl-cs.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!ukc!icdoc!dcl-cs!stephen
From: stephen@dcl-cs.UUCP (Stephen J. Muir)
Newsgroups: net.news.sa
Subject: Logging sent articles using "sendbatch".
Message-ID: <351@dcl-cs.UUCP>
Date: Mon, 5-Aug-85 16:01:44 EDT
Article-I.D.: dcl-cs.351
Posted: Mon Aug  5 16:01:44 1985
Date-Received: Fri, 9-Aug-85 02:26:03 EDT
Reply-To: stephen@dcl-cs.UUCP (Stephen J. Muir)
Organization: Department of Computing at Lancaster University.
Lines: 38
Xpath: icdoc ivax

Some sites are saving filenames of articles sent by "/usr/lib/news/sendbatch".
Unfortunately, all of the sites I've checked are doing it wrongly as they
haven't allowed for news arriving at the same time as "sendbatch" is being
executed.  Here is a version which does.
----------------------------------- cut here ----------------------------------
#!/bin/sh
echo 'Start of pack.out, part 01 of 01:'
echo 'x - sendbatch'
sed 's/^X//' > sendbatch << '/'
X: use /bin/sh
Xba=/usr/spool/news/batched
Xfor rmt in $*
Xdo
X	while test $? -eq 0 -a \( -s $ba/$rmt -o -s $ba/$rmt.work \)
X	do
X		if test -s $ba/$rmt -a ! -s $ba/$rmt.work
X		then
X			cat $ba/$rmt >> $ba/$rmt.log
X			date >> $ba/$rmt.log
X		fi
X		/usr/lib/news/batch $ba/$rmt 50000 | \
X			if test -s $ba/$rmt.cmd
X			then
X				$ba/$rmt.cmd
X			else
X				uux - -r -z $rmt!rnews
X			fi
X	done
Xdone
/
echo 'Part 01 of pack.out complete.'
exit
-- 
UUCP:	...!seismo!mcvax!ukc!dcl-cs!stephen
DARPA:	stephen%lancs.comp@ucl-cs	| Post: University of Lancaster,
JANET:	stephen@uk.ac.lancs.comp	|	Department of Computing,
Phone:	+44 524 65201 Ext. 4599		|	Bailrigg, Lancaster, UK.
Project:Alvey ECLIPSE Distribution	|	LA1 4YR