linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Changes in file (huge problem)
@ 2006-12-24 13:51 Mário Gamito
  2006-12-24 22:23 ` Glynn Clements
  2006-12-25 10:25 ` terry white
  0 siblings, 2 replies; 6+ messages in thread
From: Mário Gamito @ 2006-12-24 13:51 UTC (permalink / raw)
  To: linux-admin

Hi,

I have this file in the following format:

tarta 16340309 marsanpin brigittamario@xxx.pt
lms doom123 Luis Miguel Sequeira lms@xxx.pt
jura teste Juraci jgweb@bol.com.br
jsilva t00lt0ya5 Jorge Silva jsilva@xxx.com
tchock  mail#4829 tchock  engDias@xxx.pt
reporterx noname Duarte Oliveira mtbf99@xxx.com
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 an unknow 
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 foo@foo.foo 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.

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 from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-26 23:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-24 13:51 Changes in file (huge problem) Mário Gamito
2006-12-24 22:23 ` Glynn Clements
2006-12-24 23:31   ` Mário Gamito
2006-12-26 23:48     ` Glynn Clements
2006-12-25 10:25 ` terry white
2006-12-25 19:09   ` Mário Gamito

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).