Xref: utzoo news.misc:1274 news.admin:1817 Path: utzoo!mnetor!uunet!husc6!tut.cis.ohio-state.edu!osu-cis!att-cb!att-ih!cuuxb!dlm From: dlm@cuuxb.ATT.COM (~XT4111000~Dennis Mumaugh~C31~G18~6023~) Newsgroups: news.misc,news.admin Subject: Re: usr/spool/news/junk runneth over Message-ID: <1721@cuuxb.ATT.COM> Date: 19 Mar 88 00:32:49 GMT References: <213@unisv.UUCP> <227@unisv.UUCP> Reply-To: dlm@bambi.UUCP (Dennis L. Mumaugh) Organization: ATT Data Systems Group, Lisle, Ill. Lines: 95 Keywords: mvjunk In article <227@unisv.UUCP> vanpelt@unisv.UUCP (Mike Van Pelt) writes: ># Shell to create new newsgroups from the Newsgroups: line in every ># article in ../news/junk, remove everything from junk, and repost ># it all in the appropriate new newsgroups. ># The following is my version of a mvjunk. It attempts to mv the articles where they belong and also creat directories and newsgroups. It will handle multiple newsgroups in a article but may make a second posting. It doesn't use inews for the posting since inews will reject the article. It doesn't update the active file but leaves a list around for manual editing: Use and abuse; it's free, take it for what it's worth: ------ cut here ---------- cut here -------- cut here ---------- cut here ---- #! /bin/sh # @(#)mvjunk.sh (TRW Advanced Technology Facility) STA 2-Jun-1985 # # Modified 10/22/85-James M. Scardelis, SA, Warner Computer Systems # to create newsgroups locally only. # # Move news files out of junk and into their proper directories, # updating the active list and localgroups as we go. Unknown newsgroups # are created LOCALLY and the article installed. # # @(#)mvjunk.sh UCS Wed Dec 9 19:07:55 CST 1987 # Modified by Dennis L. Mumaugh for local conditions and made totally # unrecognizable # JUNK=/usenet/spool/junk NEWSDIR=/usenet/spool LIB=/usenet/lib BIN=/usenet/bin ACTIVE=$LIB/active PATH=$PATH:$LIB:$BIN tmp1=/tmp/news.dirs cd $JUNK if test -z "`ls`" then echo nothing in $JUNK exit fi for j in $JUNK/[01-9]* do echo working on article $j for group in `egrep '^Newsgroups:' $j | head -1 | \ sed 's;Newsgroups:[ ];;' | \ sed 's;,; ;g'` do if grep "$group " $ACTIVE then echo $group exists in active file! else echo Creating $group in active file. inews -C $group >$tmp1 done echo removing $j /bin/rm -f $j # But my MOTHER lives in Hackensack! done sort -u $tmp1 -o $tmp1 echo The file $tmp1 contains a list of articles and numbers: echo Use it to edit $ACTIVE. cat $tmp1 exit ------ cut here ---------- cut here -------- cut here ---------- cut here ---- -- =Dennis L. Mumaugh Lisle, IL ...!{attunix,ihnp4,cbosgd,lll-crg}!cuuxb!dlm