Hi
I have a text file, ‘test1.txt’. It contains data in the following format:
cn=lagrim@xplornet.com,o=combined,c=us
objectClass=top
objectClass=person
objectClass=organizationalPerson
objectClass=inetOrgPerson
objectClass=ePerson
cn=Edison
cn=lagrim@xplornet.com
sn=Baker
uid=lagrim@xplornet.com
How can I extract the “uid” field into another text file and add it in the following format.
user import lagrim@xplornet.com cn=lagrim@xplornet.com,o=combined,c=us
user modify lagrim@xplornet.com account-valid yes
I will later run the new text file as a batch script.
Any advice will be greatly appreciated.
http://www.robvanderwoude.com/ntfor…
I am not going to write the code for you, you need to do that yourself.