File:  [CSRG BSD Unix] / 43BSD / contrib / news / src / rmgroup.sh
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

: '@(#)rmgroup.sh	1.4	12/27/84'
for group
do
	echo "Removing newsgroup $group"
	qgrp="`echo $group | sed 's/\./\\\./g'`"
	if
		grep -s "^$qgrp " LIBDIR/active
	then
		cat << E_O_F >/tmp/$$
/^$qgrp[ 	]/d
w
q
E_O_F
		ed - LIBDIR/active < /tmp/$$
		ed - LIBDIR/newsgroups < /tmp/$$
		dir=SPOOLDIR/"`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
rm -f /tmp/$$
exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.