[news.admin] Inactive Groups

amos@nsta.UUCP (Amos Shapir) (07/17/87)

In view of the suggested quota system, here is something for
local control: a command (sh) file to identify all groups received
at your site but not read by anybody:

#start command file
ACTIVE=/usr/lib/news/active
cat `sed 's;[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*;\1/.newsrc;' /etc/passwd` 2> /dev/null \
| sed -n 's/\([^:]*\):.*[0-9]$/\1/p' |sort |uniq  > ng1
sed 's/ .*//' $ACTIVE |sort > ng2
diff ng1 ng2 | sed -n 's/^> //p'
#end command file

It gets the active groups out of everybody's .newsrc into ng1, the active
groups out of your ACTIVE file into ng2, then prints out those groups that
are in the latter but not the former. You can now use this list as food
for a short-term 'expire'
-- 
	Amos Shapir
National Semiconductor (Israel)
6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel  Tel. (972)52-522261
amos%nsta@nsc.com @{hplabs,pyramid,sun,decwrl} 34 48 E / 32 10 NN