To relate a user list to a group.....

Ask a Question related to PERL Miscellaneous, Design and Development.

  1. #1

    Default Re: To relate a user list to a group.....

    In article <9c2a26b6.0309091250.770378b3@posting.google.com >,
    [email]carterave@yahoo.com[/email] (Jim Carter) wrote:
    > Hi there,
    >
    > I am working on windows. I have a file (names.txt) with below names:
    >
    > ---------------
    > john
    > jerry
    > bob
    > rob
    > mike
    > rich
    > sara
    > lisa
    > anita
    > rita
    > --------------
    >
    > I have a list of groups in another file (groups.txt) with below entrees:
    >
    > --------
    > Games
    > Books
    > Tour
    > Fun
    > ---------
    >
    > These two files can grow bigger in future.
    >
    >
    > OUTPUT:
    > ------------------------------------
    > when run the perl script, foo.pl
    > C:\> foo.pl
    >
    > It should give me
    >
    > Games contains 3 people.
    > They are: 1. rich
    > 2. sara
    > 3. lisa
    >
    > Books contain NONE. ### becuase no one belongs to this group.
    >
    > Tour contains 4 people.
    > They are: 1. john
    > 2. jerry
    > 3. bob
    > 4. rob
    >
    > Fun contains 2 people.
    > They are: 1. anita
    > 2. rita
    >
    > ------------------------------
    >
    > I know that I should use hashes and arrays, but I a mstruggling with the code.
    >
    > Can some one help me out?
    >
    > Thanks,
    > Srini
    where is the file that says which group each name is in?

    --
    Michael Budash
    Michael Budash Guest

  2. Similar Questions and Discussions

    1. List AD-Group Member AND WHOSE TRUSTED DOMAIN with WinNT
      I need a List of GroupMember and the Domain where the Members come from. Because I want to identify the Members from thr trused Domain. regards...
    2. List of member for a group
      In article <4486609B-253F-4EDF-A4F0-F8A2C97B43C5@microsoft.com>, anonymous@discussions.microsoft.com says... You can use the ds* command line tools...
    3. How can I list all the users in a particular security group with ASP.NET?
      Does anyone know a way to list all the users in a particular windows security group on a .aspx web page? Thanks in advance!
    4. Specify more than 1 supplementary group for a user ??
      Whenever I do: usermod -G groupname username ..... any existing supplementary group of username, as shown from /etc/group, gets removed and...
    5. Group list elements
      Hi, I'm looking for a solution for the following problem: This is the list I have : $kommalist ="20,21,22,23,24,25,27,28,31,32,33"; And I want...
  3. #2

    Default Re: To relate a user list to a group.....


    "Jim Carter" <carterave@yahoo.com> wrote in message
    news:9c2a26b6.0309091250.770378b3@posting.google.c om...
    > Hi there,
    >
    > I am working on windows. I have a file (names.txt) with below names:
    >
    > ---------------
    > john
    > jerry
    > bob
    > rob
    > mike
    > rich
    > sara
    > lisa
    > anita
    > rita
    > --------------
    >
    > I have a list of groups in another file (groups.txt) with below entrees:
    >
    > --------
    > Games
    > Books
    > Tour
    > Fun
    > ---------
    >
    > These two files can grow bigger in future.
    >
    >
    > OUTPUT:
    > ------------------------------------
    > when run the perl script, foo.pl
    > C:\> foo.pl
    >
    > It should give me
    >
    > Games contains 3 people.
    > They are: 1. rich
    > 2. sara
    > 3. lisa
    >
    > Books contain NONE. ### becuase no one belongs to this group.
    >
    > Tour contains 4 people.
    > They are: 1. john
    > 2. jerry
    > 3. bob
    > 4. rob
    >
    > Fun contains 2 people.
    > They are: 1. anita
    > 2. rita

    The two files have no relation to each other (that you have told us) so how
    does the script determine that theses groups contain the specified people?

    >
    > I know that I should use hashes and arrays, but I a mstruggling with the
    code.


    Clarify the question/problem and post the code you are struggling with.

    > Can some one help me out?
    >
    > Thanks,
    > Srini

    --
    Brian Wakem


    Brian Wakem Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139