Jul 24, 2007, 11:32 AM
Post #1 of 2
I have a script that will join multiple files line by line into a single file (e.g., the first line of every file is inserted underneath one another starting with the dn:). Each file has to have the same number of lines.
multi file join by line
This works great, however, many of the files I'm using are static for each LDAP record I'm creating; so how do I join the unique lines with the static lines to create unique individual records.
For example: file1 contains the dn, file2 the uid, file3 the email, file4 givenName.
File5-10 contain the same objectclass attributes: Top, Person, inetOrgPerson, etc.
If I have 1000 users accounts to create, I have to dummy up 5 files with 1000 entries of each objectClass.
Isn't there a way to build a record for a user containing the lines from the unique file attributes with a list of static attributes getting a record like this:
dn: cn=RFrancis,ou=ABC,ou=ABC External Users,ou=NA,o=ABC