+: recreate the active file from readers .newsrc files
+: and from the existing articles
+
+lib=${1-/usr/lib/news}
+tmp=/tmp/$$
+: Find the highest numbered articles from the .newsrcs
+cat `sed 's/[^:]*:[^:]*:[^:]*:[^:]*:[^:]*://
+s/:.*//' /etc/passwd | sort -u | sed 's;$;/.newsrc;' ` 2>/dev/null |
+sed '/:/!d
+s/:.*[,-]/ /
+s/: */ /' >$tmp
+: in case there are groups no-one reads, look in the list of newsgroups
+sed 's/[ ].*/ 1/' $lib/newsgroups >>$tmp
+sort +0 -1 +1nr $tmp | sort -m +0u -1 | sed 's/$/ 00001 y/
+/^fa/s/y$/n/' >$lib/active
+: finally, scan the spool directory and fix up the active file.
+$lib/expire -u
+rm -f $tmp