Undigestifier in [ri]news?

Amos Shapir amos at taux01.UUCP
Wed Aug 23 08:03:22 AEST 1989


In article <986 at ethz-inf.UUCP> wyle at inf.ethz.ch () writes:
>Does anyone have *any* way of un-digest-ifying stuff like RISKS into
>separate articles?

Thanks to help from various places on the net, I came up with this:
In your sys file, put the line:

UNDIG:world,comp.risks::/usr/lib/news/undig

Where /usr/lib/news/undig contains the following.  Basically, it
cuts the digest above each Subject line, and breaks it into individual
articles which are posted locally.  (I guess this could be done with one
'sed', but since it works I never bothered to change it).


		o /		o /		o /		o /
--Cut-here-------X---------------X---------------X---------------X----
		o \		o \		o \		o \

#!/bin/sh
#Undigestify digests and post individual articles
TMP=/tmp/undig$$
trap "rm $TMP" 0 1 2 15
cat $* > $TMP

ed - $TMP << 'END'
g/^Subject: /?^$?c\
End-Of-Article\
/usr/lib/news/inews -h << 'End-Of-Article'\
Distribution: local\
Approved: netnews\
.
g,/usr/lib/news/inews ,/^Newsgroups: /t.
?^End-Of-Article?+1;$d
1;/^End-Of-Article/d
w
q
END
sh $TMP

		o /		o /		o /		o /
--Cut-here-------X---------------X---------------X---------------X----
		o \		o \		o \		o \
-- 
	Amos Shapir		amos at taux01.nsc.com or amos at nsc.nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322
34 48 E / 32 10 N			(My other cpu is a NS32532)



More information about the Comp.unix.questions mailing list