rs@mirror.UUCP (08/19/85)
I don't always read net.news.group or nfmaint, and my users certainly don't. I have found the following script very helpful in telling people about changes. It's called checkforchanges, and uses nfmail to generate a message to 'ms.announce', our local equivalent of net.announce, which everyone is supposed to read. Enjoy, /r$ #!/bin/sh # this file is in our crontab as: # 0 8 * * 7 su notes 'csh /usr/spool/notes/.utilities/checkforchanges' cd /usr/spool/notes/.utilities MESG=/tmp/CFM$$ NEW=/tmp/CFC$$ OLD=LIST TOPIC=ms.announce # Make sure this ls only puts one filename/line!!! ls .. >$NEW cmp -s $NEW $OLD if test $? -eq 0 ; then exit ; fi # You will definitely want to change this message. echo 'This file attempts to list notes files that have been created or' > $MESG echo 'deleted in the past week. You might want to check out the new' >>$MESG echo 'files and/or delete outdated ones. Another way to do this is' >>$MESG echo 'is to read the "nf*" notesfiles. This message has been auto-' >>$MESG echo 'matically created by a program. Questions or problems to rs.' >>$MESG echo '' >>$MESG echo '' >>$MESG diff $NEW $OLD | \ awk \ '/>.*/ { $1="\tDeleted: "; print } /<.*/ { $1="\tNew: "; print }' >>$MESG echo '' >>$MESG echo "If the situation is slightly different on Der Pyramid, don't" >>$MESG echo 'worry -- that condition will soon be corrected.' >>$MESG nfpipe $TOPIC -t 'Notesfile changes' <$MESG rm -f $MESG exec mv $NEW $OLD -- Rich $alz {mit-eddie, ihnp4!inmet, wjh12, cca, datacube} !mirror!rs Mirror Systems 2067 Massachusetts Ave. 617-661-0777 Cambridge, MA, 02140