It's perfect but I need something more.I need also the qw001234 with the passwd that's in another file in format:
qw001234 rfvcde And I want it for all lines of all files. I'm obviously a beginner in perl so I don't know if it is possible. Bye and many thanks for your help. David vd Geer Inhuur tbv IPlib wrote: > Hi Francesco, > > You could do it like this : > > $line = "qw001234 po001234 ghjkld zx001234 tgbnhy"; > > ($pw0,$uid1,$pw1,$uid2,$pw2) = split(/\s+/, $line); > > print NEWFILE "$uid1 $pw1 \n"; > print NEWFILE "$uid2 $pw2 \n"; > > Your current file does have to contain 5 fields. > Hope this is what you are looking for. > > Regs David > > > > > I have many files with username and passwd.The old files are in format: > > > > qw001234 asdfgh # all usernames are composed by qw/po/zx + 00 + 4 > > number > > > > The new files have three usernames and passwd for each number on each > > line: > > > > qw009876 qwerty po009876 poiuyt zx009876 mnbvcx > > > > To patch the old files someone before me made a new file with the other > > "po" and "zx" but with a big error.The format is > > > > qw001234 po001234 ghjkld zx001234 tgbnhy > > > > There's not the passwd for the user in the old file(ever qw).Now I need > > just one file with in the format > > > > qw001234 qwerty > > qw009876 qwerty > > po001234 ghjkld > > po009876 poiuyt > > zx009876 mnbvcx > > zx001234 tgbnhy > > .... > > > > Please help me.Thanks. > > > > > > > > > > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]