Wed, 21 Nov 2001 16:50:31 -0500
|
On Wed, 21 Nov 2001 16:04:10 EST, "Gnanasekaran, Viji" <[log in to unmask]> said:
> I just sent a "REVIEW" command of a list to get all the subscribers
> to a particular list. When I got the list of users in a separate file
> the domain name is all in the "upper case " letters. I want it in the
> lowercase
> letters ( Since I will be loading it into a database which is case
> sensitive).
Well... for what it's worth, the SMTP RFCs specifically say that the right hand
side is case *insensitive*. So Listserv just smashes them all to upper case
to make life easier for itself.
I am assuming your problem is that you're loading it into a partially populated
database that already has entries with lower-case domain names, and wish to
detect duplicates. If so, Perl is your friend:
#!/usr/bin/perl
while (<>) {
chomp;
next if /Ø\*/;
($user,$node,$full) = /([Ø@]*)@([Ø\s]*)\s(.*)/;
$node =~ tr/[A-Z]/[a-z]/;
print "$user\@$node $full\n";
}
/Valdis
|
|
|