Kevin, please find attached a small perl script that greps the complete dn.
You can use it like so: ldapsearch .... | dncat.pl | ldapdelete ....Anyway I would advise you to first create a file with the dns and have a look at it before deleting, but this is a matter of taste I suppose.
Hope this helps. Cheers, Peter Michael Ströder wrote:
Donn Cave wrote:On Oct 8, 2007, at 2:26 PM, Michael Ströder wrote:That says it all. Create a list of DNs to be deleted with ldapsearch, grep "^dn:" and pipe that to ldapdelete.ldapsearch's LDIF output will wrap lines at column 78, which would make trouble for this approach where DNs are longer than 74 characters. There are dozens of possible solutions using awk etc., but a plain grep doesn't seem very safe to me.Yes, right. Ciao, Michael. --- You are currently subscribed to [email protected] as: [EMAIL PROTECTED] To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the SUBJECT of the message.
-- _______________________________________________________________________ Peter Gietz (CEO) DAASI International GmbH phone: +49 7071 2970334 Wilhelmstr. 106 Fax: +49 7071 295114 D-72074 Tübingen mail: [EMAIL PROTECTED] Germany Web: www.daasi.de DAASI International GmbH, Tübingen Geschäftsführer Peter Gietz, Amtsgericht Stuttgart HRB 382175 Directory Applications for Advanced Security and Information Management _______________________________________________________________________
dncat.pl
Description: Perl program
--- You are currently subscribed to [email protected] as: [EMAIL PROTECTED] To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the SUBJECT of the message.
