rmgroup doesn't work with Eunice; here's a fix
Joe Buck
jbuck at epimass.UUCP
Sat Dec 13 09:34:39 AEST 1986
Eunice does not support the '[' synonym for test (and you can't
name a file '[' on Eunice in any case). Furthermore, ed writes a
file out in VMS format instead of Unix format, so we must invoke
vmstounix on "active" once we're done. Here's a revised version.
------------------------------------------------------------------------------
: '@(#)rmgroup.sh (from 1.6; modified for Eunice 12/12/86, epimass!jbuck)'
for group
do
echo "Removing newsgroup $group"
qgrp="`echo $group | sed 's/\./\\\./g'`"
if
grep -s "^$qgrp " /usr/lib/news/active
then
cat << E_O_F >/tmp/$$
/^$qgrp[ ]/d
w
q
E_O_F
ed - /usr/lib/news/active < /tmp/$$
ed - /usr/lib/news/newsgroups < /tmp/$$
dir=/usr/spool/news/"`echo $group | sed 's/\./\//g'`"
if test -d $dir
then
rm $dir/*
rmdir $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/$$
/etc/vmstounix /usr/lib/news/active
exit 0
------------------------------------------------------------------------------
--
- Joe Buck {hplabs,ihnp4,sun}!oliveb!epimass!jbuck HASA (A,S)
Entropic Processing, Inc., Cupertino, California
More information about the Comp.os.eunice
mailing list