[wplug] Script help again
Gentgeen
gentgeen at linuxmail.org
Fri Aug 18 11:04:14 EDT 2006
On Mon, 14 Aug 2006 17:15:21 -0400
Duncan Hutty <dhutty+wplug at ece.cmu.edu> wrote:
>
> There are lots of ways to do this.
> perl has a nice little module. Here are the important bits.
>
> Add your own command line option management, input validity checking,
> etc.
>
>
> use Digest::MD5;
>
> open(INFILE,$infile);
> open(OUTFILE,>$outfile);
> while (<INFILE>) {
> ($username,$password,$realname,$email,$roll) = split(/,/);
> $md5 = md5($password);
> $output = "${username}:${md5}:${realname}:${email}:${roll}\n";
> print OUTFILE $output;
> }
>
> --
> Duncan Hutty
>
Sorry for the long delay between replies, I have been on a business trip
in Philly...
Thank you very much, with your post and another 1 I was able to put
stuff in without spending all day doing it :-)
--
http://gentgeen.homelinux.org
#############################################################
Associate yourself with men of good quality if you esteem
your own reputation; for 'tis better to be alone then in bad
company. - George Washington, Rules of Civility
More information about the wplug
mailing list