Man, JUST as I hit `s', I saw the hardcoded ``CIESIN'' in the shell
script and thought . o O ( Hey, that should be a variable... )
Anyway, if you use the script to create INDEX files that I just sent out,
please edit the line that has CIESIN on it or use the new script below:
My humble apologies for mailbox spammage for no other reason than
quick finger syndrome.
The following is not a shar file -- save, edit, etc..
#!/bin/sh
# create_index 2.0
# Jeff Blaine, 1994
#
# Installation:
#
# Edit the ARCHIVEDIR variable below
# Edit the ORGANIZATION variable below
# chown to the username who owns the normal majordomo stuff
# chgrp to the group who owns the normal majordomo stuff
# chmod to 775
# Run this script out of cron every 8 hours or so, such as:
# 0 0,8,16 * * * /var/sendmail/majordomo/create_index
#
# Purpose:
#
# Create a simple INDEX file from the contents of the messages in the
# archive directories.
#
ARCHIVEDIR=/var/sendmail/majordomo/archives
ORGANIZATION='CIESIN'
cd $ARCHIVEDIR
# for every file in ARCHIVEDIR, test to see if it is a directory, if it
# is, cd into that dir and create an INDEX file, if it is not a directory,
# do nothing
for i in *
do
if [ -d $i ]; then
cd $i
rm -f INDEX
echo "$ORGANIZATION $i mailing list INDEX of files" > INDEX
echo "" >> INDEX
echo "FILE - SUBJECT" >> INDEX
echo "--------------" >> INDEX
egrep "^Subject:" * | sed 's/:S/ - S/' >> INDEX
cd ..
fi
done
# End of shell script
|
|