Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!purdue!decwrl!sun!mongo!waynet From: waynet@mongo.uucp (Wayne Thompson) Newsgroups: comp.sys.amiga Subject: Re: Admin sources/binaries (auto archiver) Message-ID: <33606@mongo.uucp> Date: 27 Jan 89 16:08:44 GMT References: <764@zehntel.UUCP> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 38 In-reply-to: donw@zehntel's message of 24 Jan 89 20:53:57 GMT Also here's my automated archiving script for comp.{binaries,sources}.amiga. Wayne #! /bin/sh # zoonew - archive news articles - W.Thompson - 08/27/88 trap 'touch /tmp/$$; rm -f /tmp/*$$; exit' 0 1 2 3 14 15 NEWSPATH=/usr/spool/news GETNEW() { # src_dir dest_dir echo "Checking $1..." DESTBASE=`basename $2` # find new files /bin/ls $1 > /tmp/news$$ zoo l $2/$DESTBASE | awk '/[0-9]$/ { print $NF }' | sort > /tmp/my$$ NEW=`comm -23 /tmp/news$$ /tmp/my$$ | sort -n` # archive files with subject line as comment for i in $NEW do subject=`awk ' /^Subject:/ { print substr ($0, 10); exit; } ' $1/$i` echo "archiving $1/$i..." echo $subject echo $subject | zoo acq: $2/$DESTBASE $1/$i 2> /dev/null done return } GETNEW $NEWSPATH/comp/binaries/amiga $HOME/news/amiga/bin GETNEW $NEWSPATH/comp/sources/amiga $HOME/news/amiga/src