Changes in file (huge problem) | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi, I have this file in the following format: tarta 16340309 marsanpin brigittamario@xxxxxx lms doom123 Luis Miguel Sequeira lms@xxxxxx jura teste Juraci jgweb@xxxxxxxxxx jsilva t00lt0ya5 Jorge Silva jsilva@xxxxxxx tchock mail#4829 tchock engDias@xxxxxx reporterx noname Duarte Oliveira mtbf99@xxxxxxx 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@xxxxxxx 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Linux Newbie] [Audio] [Hams] [Kernel Newbies] [Memory] [Util Linux NG] [Security] [Netfilter] [Bugtraq] [Writing Drivers] [Photo] [Yosemite Photos] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux Security] [Linux RAID] [Samba] [Video 4 Linux] [Git] [Linux Resources] [Fedora Users]
![]() |
![]() |