linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Mário Gamito" <gamito@gmail.com>
To: linux-admin@vger.kernel.org
Subject: Changes in file (huge problem)
Date: Sun, 24 Dec 2006 13:51:06 +0000	[thread overview]
Message-ID: <458E85CA.7050802@gmail.com> (raw)

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

             reply	other threads:[~2006-12-24 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-24 13:51 Mário Gamito [this message]
2006-12-24 22:23 ` Changes in file (huge problem) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=458E85CA.7050802@gmail.com \
    --to=gamito@gmail.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).