Hi,
I have this file in the following format:
tarta 16340309 marsanpin [EMAIL PROTECTED]
lms doom123 Luis Miguel Sequeira [EMAIL PROTECTED]
jura teste Juraci [EMAIL PROTECTED]
jsilva t00lt0ya5 Jorge Silva [EMAIL PROTECTED]
tchock mail#4829 tchock [EMAIL PROTECTED]
reporterx noname Duarte Oliveira [EMAIL PROTECTED]
erkulix brunoverab4 Bruno Cruz
First field is a username;
Second field is a password in clear text;
*Last field* is the email;
The field between is the name.
As you can see, some lines don't have the name, and names have a
variable number of words.
Some lines don't have the e-mail.
What i need is:
Change the second field to the correspondent md5 hash.
Insert [EMAIL PROTECTED] in the end of the lines that have no email.
Insert the string "NO_NAME" in the ones that don't have a name in it's
field.
Substitute spaces for ":", *except* of course the spaces within the name.
At the end of each line add the string ":user" (without the quotes).
In the end, a perfect line is something like:
gamito:b31dda31342d6dfg6537342c1bc3852d:Mario Gamito:[EMAIL PROTECTED]:user
I know how to do some of these things, others i don't.
Can someone help me, please ?
Thanks in advance.
Warm Regards,
Mário Gamito
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>