Parsing Fields LDAP
Hi,
I have just exported my LDAP, and i am trying to make a list with all user login names, along with their real names and departments. I tried doing so with the "cut" command, but cut cuts inside "quotation, marks". This way, i have two fields inside the quotation marks, which i don't want. Is there any way to select these fields, for user-id, first name, and last name, and put them in a list? |
some sample output would be nice....
|
Yes, some sample output, please.
|
Code:
dn: CN=Connector for Lotus Notes (EX1),CN=Connections,CN=First Routing Group,CN=Routing Groups,CN="First Administrative Group, Networking",CN=Administrative Groups,CN=VINC,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=vinc,DC=biz changetype: modify replace: msExchExportContainersLinked msExchExportContainersLinked: OU=GroupWise Users,DC=vinc,DC=biz msExchExportContainersLinked: OU=AD Users,DC=vinc,DC=biz msExchExportContainersLinked: CN=Users,DC=vinc,DC=biz The above should only be one field, within the two commata. "First Administrative Group, Networking" should not be parsed as two fields, because the comma is inside the quotation marks. Sorry for answering so late: The spam blocker blocked the email notification of the response... My bad. |
Can you change the exported field separator (i.e. in LDAP)?
Can you specify a <Tab>, which is cut's default field separator, instead of the current comma? This would kill the proverbial 2 birds w/ one stone -- the commas inside quotes would be distinguished from the field separators, & there would be no need to change the separator in the cut command. |
All times are GMT -5. The time now is 11:50 AM. |