[K12OSN] OT - looking for some scipting help
Gentgeen
gentgeen at linuxmail.org
Mon Aug 14 19:33:59 UTC 2006
On Mon, 14 Aug 2006 14:51:14 -0400
Scott Sherrill <scott at remc1.org> wrote:
>
> > Anyone?
> >
> > I thank you in advance for your time.
> >
> >
>
> try it before you use it ;-)
> Change file.csv to the name of the file
>
> #!/usr/bin/perl
>
> open (DATA, "cat ./file.csv | ");
> while(<DATA>)
> {
> ($userid,$rest) = split (/,/$_,2);
> $pass = `echo -n $userid | md5sum | cut -d" " -f1`;
> print "$userid,$pass";
> }
> close(<DATA>);
>
>
To Paul -- I wish it was that easy :-) No need to go into it here, but
we have no central "login" and we have teachers all over the state (I
work for a virtual charter school in pgh)
To Scott,
Thank you, but this is what I got (and since I don't know perl at all, I
am not sure what to troubleshoot/look for) I named the script
"doku_user_script" (warning wrapping may accure - I have numbered the
lines):
(1) Scalar found where operator expected at ./doku_user_script line 6,
near "/,/$_" (Missing operator before $_?)
(2) syntax error at ./doku_user_script line 6, near "/,/$_"
(3) Type of arg 1 to close must be HANDLE (not <HANDLE>) at
./doku_user_script line 10, near "<DATA>)"
(4) Execution of ./doku_user_script aborted due to compilation errors.
If you see what the error is, great! If not, don't beat yourself up
over it.
Again, I thank you for you time.
Kevin
--
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 K12OSN
mailing list