Re: remove line if field one is duplicate
- From: chas.owens@xxxxxxxxx (Chas Owens)
- Date: Wed, 28 Feb 2007 10:52:17 -0500
On 2/27/07, Keenan, Greg John (Greg)** CTR **
<gjkeenan@xxxxxxxxxxxxxxxxxx> 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]}++'
.
- References:
- remove line if field one is duplicate
- From: Greg John ** CTR ** Keenan
- remove line if field one is duplicate
- Prev by Date: Characters from encryption
- Next by Date: Re: Characters from encryption
- Previous by thread: Re: remove line if field one is duplicate
- Next by thread: Re: remove line if field one is duplicate
- Index(es):
Relevant Pages
|
|