Hmm, I think this is the right time again to recommend to use a decent scripting language with a LDAP module to do searches and convert data. It's far more efficient and readable.
Agreed. python-ldap or Net::LDAP for perl are both substantially better for this sort of work than the command line tools.
--Quanah -- Quanah Gibson-Mount Server Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration