Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/12/84; site seismo.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!zinfandel!hplabs!hao!seismo!rick
From: rick@seismo.UUCP (Rick Adams)
Newsgroups: net.news.adm
Subject: Re: Arrrgh! I lost my active file!!
Message-ID: <3958@seismo.UUCP>
Date: Thu, 20-Sep-84 00:48:16 EDT
Article-I.D.: seismo.3958
Posted: Thu Sep 20 00:48:16 1984
Date-Received: Tue, 25-Sep-84 02:08:42 EDT
References: <1103@t4test.UUCP>
Distribution: net.all
Organization: Center for Seismic Studies, Arlington, VA
Lines: 30

The following "simple" shell file will restore the active file
for any 2.10.2 system. It requires the 2.10.2 expire. Howver,
if you are still running 2.10 or 2.10.1, you can convert the
active file back to 2.10 format by removing the last 7 characters from each 
line in the active file (i.e. sed 's/.......$//')

---rick

echo x - restore.active
sed 's/^X//' >restore.active <<'*-*-END-of-restore.active-*-*'
X: recreate the active file from readers .newsrc files
X: and from the existing articles
X: syntax is restire.active LIBDIR
X
Xlib=${1-/usr/lib/news}
Xtmp=/tmp/$$
X: Find the highest numbered articles from the .newsrcs
Xcat `sed 's/[^:]*:[^:]*:[^:]*:[^:]*:[^:]*://
Xs/:.*//' /etc/passwd | sort -u | sed 's;$;/.newsrc;' ` 2>/dev/null  | 
Xsed '/:/!d
Xs/:.*[,-]/ /
Xs/: */ /'  >$tmp
X: in case there are groups no-one reads, look in the list of newsgroups
Xsed 's/[ 	].*/ 1/' $lib/newsgroups >>$tmp
Xsort  +0 -1 +1nr  $tmp | sort -m +0u -1 | sed 's/$/ 00001 y/' >$lib/active
X: finally, scanf the spool directory and fix up the active file.
X$lib/expire -u
Xrm -f $tmp
*-*-END-of-restore.active-*-*
exit