On 2/27/07, Keenan, Greg John (Greg)** CTR **
<[EMAIL PROTECTED]> wrote:
Hi,

I have to combine several Unix password files and remove any duplicate
accounts - putting this into LDAP.

I have the following code that will remove any duplicate whole lines but
I need to remove lines only if the first field of the password file is a
duplicate.

This should work

perl -ne 'print unless $h{(split/:/)[0]}++'

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to