|
|
1.1 root 1: : '@(#)rmgroup.sh 1.8 12/16/86'
2: for group
3: do
4: qgrp="`echo $group | sed 's/\./\\\./g'`"
5: if
6: grep -s "^$qgrp " LIBDIR/active
7: then
8: echo "Removing newsgroup $group"
9: echo "/^$qgrp[ ]/d" >>/tmp/,edit$$
10: dir=SPOOLDIR/"`echo $group | sed 's/\./\//g'`"
11: if test -d $dir
12: then
13: rm $dir/* >/dev/null 2>&1
14: echo "rmdir $dir >/dev/null 2>&1" >>/tmp/,rmdir$$
15: else
16: echo "$0: $dir: no spool directory" 2>&1
17: fi
18: else
19: echo "$0: $group: no such newsgroup" 2>&1
20: fi
21: done
22: echo w >>/tmp/,edit$$
23: echo q >>/tmp/,edit$$
24: echo "Editing LIBDIR/active..."
25: ed - LIBDIR/active < /tmp/,edit$$
26: FIXACTIVE
27: echo "Editing LIBDIR/newsgroups..."
28: ed - LIBDIR/newsgroups < /tmp/,edit$$
29: echo "Removing directories..."
30: if test -s /tmp/,rmdir$$
31: then
32: sort +1r -o /tmp/,rmdir$$ /tmp/,rmdir$$
33: . /tmp/,rmdir$$
34: fi
35: rm -f /tmp/,edit$$ /tmp/,rmdir$$
36: exit 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.