<[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]}++' Thanks Jeff & Chas Both solutions work perfectly. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/