On 4/23/05, Peter Marschall <[EMAIL PROTECTED]> wrote:
> On Friday 22 April 2005 17:35, Gautam Gopalakrishnan wrote:
> > Some attributes don't change values very often and sometime you don't
> > need the latest information? Maybe it's just me, but I thought this
> > would be useful. I've started coding it, just for the challenge.
> 
> You may use ldifgrep (http://sourceforge.net/projects/ldifgrep).
> It's a perl script that greps the entries from an LDIF file where
> the arguments matches an attribute's value

Not good enough :-(

> The problem for applying filters on LDIF entries is that you do not
> know about the syntaxes of the attributes and thus do not know
> how to compare the values.

I'm just using Net::LDAP::LDIF to usurp entries. I have some sample
code which works. Net::LDAP::Filter also eliminates most of the work
involved. Currently it implements just the operations I use at work
(and, or, exists and substrings). The code is slow mainly because
Net::LDAP::LDIF is slow. Parsing about 116000 entries takes about
20 minutes, of which 72% is spent inside Net::LDAP::LDIF. But it works.

http://www-personal.monash.edu.au/~ggop/ldifsearch.pl.html

> Have fun

I am :-) Any kind of feedback is welcome.

Cheers
Gautam

Reply via email to