Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
09-04-2006, 05:41 PM
|
#1
|
|
Member
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264
Rep:
|
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?
|
|
|
|
09-05-2006, 09:52 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,707
|
some sample output would be nice....
|
|
|
|
09-14-2006, 12:35 PM
|
#3
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Yes, some sample output, please.
|
|
|
|
09-14-2006, 06:08 PM
|
#4
|
|
Member
Registered: Sep 2005
Location: California
Distribution: Slackware & Debian
Posts: 264
Original Poster
Rep:
|
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
,CN="First Administrative Group, Networking",
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.
|
|
|
|
09-15-2006, 03:17 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:26 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|