[wplug] Script help again

Gentgeen gentgeen at linuxmail.org
Mon Aug 14 09:19:34 EDT 2006



This year, I am setting up a wiki (DokuWiki) as our "teachers toolbox". 
I have everything set, but no I need to add some 100+ teachers to the
authenication file.  And since Doku does not have a "batch" add, I am
hoping I can do it by a script instead of added each one by hand.

I currently have a CSV sheet with all necessary info, except the
password.  The password has to be an md5sum has.

So right now my CSV sheet looks something like this:

username,password,RealName,email,roll
admin,,Admin,ksquire at pavcs.org,admin

I know that "echo -n PASSWORD | md5sum" will output the password to the
command line.

The password and the username will be the same for inital login, so I
just need to get column 1 read to md5sum, and then have that output
written to column 2.  Then repeat until it gets to the end of the file. 
The only spaces in the file would be in the "Real Name" section (if that
helps any).  

the DokuWiki User file uses the same format, except the commas are
colons, but that part I can get :-)

Anyone?  

I thank you in advance for your time.


-- 
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