Previous Topic: Exit Status Codes for the DXtools

Next Topic: DXcertgen Tool

csv2ldif Tool—Create an LDIF File from a CSV File

Use the csv2ldif tool to create an LDIF file from a CSV file. You can then use the LDIF file as source input to DXmodify.

csv2ldif directs its output to standard output. To create an LDIF file, redirect the output to a file name.

This command has the following format:

csv2ldif options numfields LDTfile CSVfile

Example: Convert Sample CSV Data Using an LDT File

The following command uses the csv2ldif utility to convert CSV data to LDIF:

csv2ldif -i 1 7 acme.ldt acme.csv > acme.ldi

The output is redirected to the acme.ldi file. The following is a portion of acme.ldi:

dn: o=Acme, c=US
oc: organization
dn: ou=Administration, o=Acme, c=US
oc: organizationalUnit
dn: cn=Fred Jones, ou=Administration, o=Acme, c=US
oc: organizationalPerson
postalAddress: 11 Main Street $ Newtown
surname: Jones
title: Manager
telephonenumber: +1 (123) 456 7890
telephonenumber: +1 (987) 654 3210
dn: ou=Sales, o=Acme, c=US
oc: organizationalUnit

Telephonenumber appears twice because it is a multi-valued attribute

More information:

The Format of LDT files


Copyright © 2009 CA. All rights reserved. Email CA about this topic