fMakeLDIF - Convert C V S files to LDIF


I often need to modify or add a lot of users and I get the data from
some system in cvs format. To quickly convert these data to ldif I
wrote this tool. I've only tested it on Windows but it should work
on Linux as well. Perl must be installed to make it work
since this is a perl script. Type -h to get help:

Usage: -t <template> -a <attrib> [-o <output>] [-s
<seperator>] [-h]


-t file   Template file. This file is the template of the LDIF
code to be generated. Use *1..*n as variables to be replaces
from the attribute file.

-a file   "Something"-separaded file with attributes to be
replaced by the variables in the template. Ie.:

                      attrib.txt file

                      template.ldif file
dn: cn=*1,ou=users,o=myorg
changetype: modify
replace: l
l: *2

This will generate:

                      dn: cn=user1,ou=users,o=myorg
changetype: modify
replace: l
l: locationA

-o file   The file to write LDIF code to. If not specified it
will be written to <STDOUT>.

-s sep   The separator for the attribute file. If not
specified ';' will be used. Use tab for \t (tabulator) and space for

-h   Prints this help text.

Ie.: -t template.file -a attrib.file -o new.ldif -s tab


Comment List
Related Discussions