From: James Edward Gray II Date: 2006-10-03T00:23:44+09:00 Subject: Re: Ruby for Sysadmin On Oct 2, 2006, at 10:17 AM, Ron Mr. wrote: > I need to write a script that pulls usernames our of a file that is > formatted like the following. > > "ADLER, CHARLES DAVID" 00-9388 x0753 Engineering > "ANSELL, ROBERT D" 14-2675 x1624 Sales > "BIANCHI, CHRISTOPHER" 12-2275 x3280 Marketing > "CAPOZZI, MICHAEL B" 08-3191 x8035 Manufacturing > > The last column is what group the user is in. > The username needs to be the initials plus the first three letters of > the group for example... > > cdaeng > > The GECOS field would be "Charles David Adler 00-9388 x0753 > Engineering" > > I also need to have it use a default password or "p@ssw0rd!" > > Any tips or source code examples would be great, thanks! Try reading the lines one at a time. See if you can locate the name and group. Then try munging those into what you need. If you get stuck post your code and a description of the problem and we'll get you going again. Good luck! James Edward Gray II