From peter.lewis@info.curtin.edu.au Thu Jul 29 21:45:08 1993
Return-Path: <peter.lewis@info.curtin.edu.au> test
Received: from cujo.curtin.edu.au by cs-mail.bu.edu (5.61+++/Spike-2.1)
	id AA25548; Thu, 29 Jul 93 21:44:35 -0400
Received: from ncrpda.curtin.edu.au by cujo.curtin.edu.au with SMTP id AA04125
  (5.65c/IDA-1.4.4 for <tasos@cs.bu.edu>); Fri, 30 Jul 1993 09:43:57 +0800
Received: from [134.7.122.51] (rocky) by ncrpda.curtin.edu.au with SMTP id AA22330
  (5.65c/IDA-1.4.4 for <tasos@cs.bu.edu>); Fri, 30 Jul 1993 09:43:58 +0800
Message-Id: <199307300143.AA22330@ncrpda.curtin.edu.au>
Date: Fri, 30 Jul 1993 09:46:36 +0800
To: tasos@cs.bu.edu
From: Peter N Lewis <peter.lewis@info.curtin.edu.au>
X-Sender: peter@ncrpda.curtin.edu.au
Subject: changename.pl
Status: RO

Hi,

People occasionally change their Email address, and its a pain for either
them or me to make the change (unless list server does some magic somewhere
that I haven't seen).  Anyway, here is a perl script to do it, I don't know
if you want to include it with list server, or hack it up into something
more useful or ignore it.  Anyway, if you want to do anything with it, its
all yours, if not, chuck it in the bin :-)
   Peter.

#!/usr/local/bin/perl -w

$argc = $#ARGV +1;

if ($argc !=2) {
  print "Usage: changename.pl oldname newname\n";
  print "$argc\n";
  exit(1);
}

$old=shift @ARGV;
die unless $old;
$new=shift @ARGV;
die unless $new;

$old =~ tr/a-z/A-Z/;
$new =~ tr/a-z/A-Z/;

for $dir (<*>) {
  next unless -e "$dir/.subscribers";
  print "$dir\n";
  system("perl -i.bak -pe 's/^$old /$new /' $dir/.subscribers");
  system("diff $dir/.subscribers.bak $dir/.subscribers");
}
_______________________________________________________________________
Peter N Lewis <peter.lewis@info.curtin.edu.au>       Ph: +61 9 368 2055


