ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hey, i want to load my users in with a vbs script into active directory from a text file. I only got one problem the text layout is different, i mean: How it works
John, Bond, Strangepasword, test
James, Bond, Strangepasword, test
But my text file is set up like
John
Bond
Strangepasword
test
James
Bond
Strangepasword
test
How to fix this, i know my vbs script seperates cells by ",". Should i change it in vbsscript yes? how? should i change the text file with another program to match the layout, like excell. if so how do i do this?
I don't know vbs script however you CAN do this in Excel if necessary because Excel allows for string "arithmetic".
Say you had the follow in cells C3-C6 in an Excel spreadsheet:
John
Bond
Strangepasword
test
In another cell you can put the following formula in:
=C3&", "&C4&", "&C5&", "&C6
Which would result in:
John, Bond, Strangepasword, test
Notice the formula uses & rather than + to "add" strings. Also notice you have to include literal strings within double quotes. Finally notice that you have to include the space after the comma in your literal string to insure you have the space in the result.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.