From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?M=E1rio_Gamito?= Subject: Changes in file (huge problem) Date: Sun, 24 Dec 2006 13:51:06 +0000 Message-ID: <458E85CA.7050802@gmail.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="iso-8859-1"; format="flowed" To: linux-admin@vger.kernel.org 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 =46irst 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 unkno= w=20 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=20 field. Substitute spaces for ":", *except* of course the spaces within the nam= e. I know how to do some of these things, others i don't. Can someone help me, please ? Thanks in advance. Warm Regards, M=E1rio 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