Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site eneevax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!floyd!cmcl2!seismo!rlgvax!cvl!umcp-cs!eneevax!chris From: chris@eneevax.UUCP Newsgroups: net.sources Subject: ``rmgroup'' shell script to aid in hand removal of newsgroups Message-ID: <131@eneevax.UUCP> Date: Tue, 5-Jun-84 09:29:19 EDT Article-I.D.: eneevax.131 Posted: Tue Jun 5 09:29:19 1984 Date-Received: Wed, 6-Jun-84 06:59:53 EDT Organization: Univ. of Maryland, EE Dept. Lines: 42 Here's a handy shell script for manually removing newsgroups. ---------------------tear at dashed lines-------------------- #! /bin/sh # # @(#)rmgroup.sh (U of Maryland) FLB 28-Jun-1983 # Bug fixes 5 June 1984 Chris Torek # # Delete a newsgroup lib=/usr/lib/news spool=/usr/spool/news for group do qgrp="`echo $group | sed 's/\./\\\./g'`" if grep -s "^$qgrp [0-9][0-9][0-9][0-9][0-9]$" $lib/active then ed - $lib/active << xxxFOOxxx /^$qgrp [0-9][0-9][0-9][0-9][0-9]$/d w q xxxFOOxxx dir=$spool/"`echo $group | sed 's/\./\//g'`" if [ -d "$dir" ] then rm -r "$dir" else echo "$0: $dir: no spool directory" 2>&1 fi else echo "$0: $group: no such newsgroup" 2>&1 fi done exit 0 ---------------------tear at dashed lines-------------------- -- In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690 UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland