[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Discussion: ldapdelete.c



On Thu, Mar 04, 1999 at 11:51:50AM -0800, JR Heisey wrote:
> I think it would be a convienence if ldapdelete could
> read an LDIF file ingorning all lines except the line
> the begin with 'DN: '. Then delete entry specified by
> the DN field.

Simple solution:

grep ^dn: temp.ldif | awk -F: '{ print $2; }' | ldapdelete

> Generate an LDIF list using a filer (i.e.
> objectclass=person)
> then use ldapdelete to remove all the entries returned.

Easy as well:

ldapsearch objectclass=person dn | ldapdelete

Hope this helps.

-- 
-----    -- - -------- --------- ----  -------  -----  - - ---   --------
Ben Collins <b.m.collins@larc.nasa.gov>                  Debian GNU/Linux
OpenLDAP Core - bcollins@openldap.org                 bcollins@debian.org
UnixGroup Admin - Jordan Systems         The Choice of the GNU Generation
------ -- ----- - - -------   ------- -- ---- - -------- - --- ---- -  --