Xref: utzoo alt.config:2079 alt.sources:1917 news.software.b:4829 Path: utzoo!utstat!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!spies!zorch!scott From: scott@zorch.SF-Bay.ORG (Scott Hazen Mueller) Newsgroups: alt.config,alt.sources,news.software.b Subject: Re: manual newgroup for C news Message-ID: <1990May24.144503.12544@zorch.SF-Bay.ORG> Date: 24 May 90 14:45:03 GMT References: <90May22.235719edt.19970@me.utoronto.ca> Distribution: alt Organization: SF Bay Public-Access Unix Lines: 82 In article <90May22.235719edt.19970@me.utoronto.ca> eastick@me.utoronto.ca (Doug Eastick) writes: >Since I'm passing on the usenet alias to someone else, I thought I'd >ease the pain of all the stupid newgroups in alt.*. Now it just tells >you to do an addgroup alt.dorkheads (aw jeez, now some dork will >actually go out and do it!). Replaces $NEWSBIN/ctl/newgroup. Since I'm not the first, I thought that I'd pass along my versions of ctl/newgroup and ctl/rmgroup. Also hacked to only pass a message, but sends along any message text from the original control article. #! /bin/sh # newgroup group flag - create group (4-field version: B-2.10.3+ compatible) # subject to our sys file group pattern # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} export NEWSCTL NEWSBIN NEWSARTS PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH # include mkpdir umask $NEWSUMASK afile=/tmp/ncd afilehdr=/tmp/ncdhdr afilebody=/tmp/ncdbody hdr=/tmp/nc$$ trap "rm -f $hdr $afile*; exit 0" 0 $NEWSBIN/inject/tear $afile $NEWSBIN/canonhdr <$afilehdr >$hdr # unapproved ctl msg? then quit grep -s '^Approved:' $hdr >/dev/null || { rm -f $hdr; exit 0; } SENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//'`" case "$SENDER" in "") SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//' `" ;; esac ( echo "Subject: newgroup $1 $2"; echo "$SENDER says:"; cat $afilebody ) | mail $NEWSMASTER #! /bin/sh # rmgroup group - snuff group # =()<. ${NEWSCONFIG-@@}>()= . ${NEWSCONFIG-/usr/lib/news/bin/config} export NEWSCTL NEWSBIN NEWSARTS PATH=$NEWSCTL/bin:$NEWSBIN:$NEWSPATH ; export PATH umask $NEWSUMASK afile=/tmp/ncd afilehdr=/tmp/ncdhdr afilebody=/tmp/ncdbody hdr=/tmp/nc$$ $NEWSBIN/inject/tear $afile $NEWSBIN/canonhdr <$afilehdr >$hdr # unapproved ctl msg? then quit egrep '^Approved:' $hdr >/dev/null || { rm -f $afile*; exit 0; } # quit if no active entry egrep "^`echo $1 | sed 's/\./\\\\./g'` " $NEWSCTL/active >/dev/null || { rm -f $hdr $afile*; exit 0; } SENDER="`grep '^Sender:' $hdr | sed 's/^[^:]*: *//'`" case "$SENDER" in "") SENDER="`grep '^From:' $hdr | sed 's/^[^:]*: *//'`" ;; esac # tell the local usenet administrator to do it by hand ( echo "Subject: rmgroup $1"; echo "$SENDER says:"; cat $afilebody ) | mail $NEWSMASTER rm -f $hdr $afilehdr $afilebody -- Scott Hazen Mueller | scott@zorch.SF-Bay.ORG or (ames|pyramid|vsi1)!zorch!scott 10122 Amador Oak Ct.|(408) 253-6767 |Mail fusion-request@zorch.SF-Bay.ORG Cupertino, CA 95014|Love make, not more|for emailed sci.physics.fusion digests SF-Bay Public-Access Unix 408-996-7358/61/78/86 login newuser password public