Loading ...
Sorry, an error occurred while loading the content.

Really a true beginner

Expand Messages
  • knowledgevisionstaythirsty
    1) Assigned a task to extract data fron a text file. 2) Output file needs to be very specific, and created monthly 3) tried doing in korn shell too complex 4)
    Message 1 of 7 , Jul 2, 2012
    • 0 Attachment
      1) Assigned a task to extract data fron a text file.
      2) Output file needs to be very specific, and created monthly
      3) tried doing in korn shell too complex
      4) Figured Perl my best option, but don't know Perl
      5) Bought The Perl CD Book Shelf
      6) Installed Strawberry Perl

      Output format is simple, but extracting the data I haven't a clue where to start.
      I am starting to open the book today so any advise is welcome ( I am not trying to get someone to write this for me, just point me in the right direction )

      Desired output:

      [code]

      UserName~RepoName/PATH~GroupName~Access

      (Note: _admn is a special case and repeated in every Repo so its output would look like

      UserName~~GroupName~Read Write Access

      Access need to be spelled out r = Read only, rw = Read Write)

      [/code]

      Example Input File:
      [code]
      #[groups]
      svnAdmins_admn = johnl1, bill4, saras2
      auditors_cgrp = dave101
      other_cgrp = gullapp, pughj, frayerm1, naidue, ramseym4, kochw, leej95, joness22, davidsm9
      build_cgrp = mohameh, johnsod5
      foospecial_cgrp = browng3, mintzh, scottj11, svnbeta
      barspecial_cgrp = lambt4, cheny1, locklie, nicholk9
      repo1_devs = ritched2, appalas, bohnerc, davidss1, goulett2, kriegn, kumara19, kumarr19
      repo1_owners = nadign, pengh1, poojary, predovc, settyp, shirwan
      repo1_readers = mandeh1, dinwidg, pals, rajendk1, pantk
      repo2_devs = yonuta1, cmbuild, carmacs, greeng1, rickg
      repo2_owners = sundarb1, dhayagp, thoomuv
      repo2_readers = buschm2, todorob, shukkun, enjetyv1

      #[Repo access rules]

      [repo1:/]
      @repo1_devs = r
      @repo1_owners = rw
      @repo1_readers = r
      @svnAdmins_admn = rw
      @auditors_cgrp = r
      @other_cgrp = r
      @build_cgrp = r
      @foospecial_cgrp = r

      [repo1:/branches]
      @repo1_devs = rw
      @foospecial_cgrp = rw

      [repo1:/tags]
      @foospecial_cgrp = rw

      [repo1:/trunk]
      @repo1_devs = rw

      [repo1:/trunk/project1]
      @repo1_devs = rw
      @other_cgrp = rw

      [repo1:/trunk/project2]
      @foospecial_cgrp = rw
      @repo1_devs = rw

      [repo1:/trunk/project3]
      @repo1_devs = rw
      @build_cgrp = rw

      [repo2:/]
      @repo1_devs = r
      @repo1_owners = rw
      @repo1_readers = r
      @svnAdmins_admn = rw
      @auditors_cgrp = r
      @foospecial_cgrp = r

      [repo2:/branches]
      @repo1_devs = rw

      [repo2:/tags]
      @foospecial_cgrp = rw

      [repo2:/trunk]
      @repo1_devs = rw

      [repo2:/trunk/project1]
      @repo2_devs = rw
      @other_cgrp = rw

      [repo2:/trunk/project2/foo]
      @repo1_devs = rw
      @foospecial_cgrp = rw
      @barspecial_cgrp = r

      [repo2:/trunk/project3/foo/bar]
      @repo1_devs = rw
      @build_cgrp = rw
      @barspecial_cgrp = rw

      [/code]
    • Shlomi Fish
      Hi knowledgevision, first of all, I should note that you are likely to receive better help on beginners@perl.org : http://lists.perl.org/list/beginners.html On
      Message 2 of 7 , Jul 2, 2012
      • 0 Attachment
        Hi knowledgevision,

        first of all, I should note that you are likely to receive better help on
        beginners@... :

        http://lists.perl.org/list/beginners.html

        On Mon, 02 Jul 2012 13:22:33 -0000
        "knowledgevisionstaythirsty" <pcpinkerton@...> wrote:

        > 1) Assigned a task to extract data fron a text file.
        > 2) Output file needs to be very specific, and created monthly
        > 3) tried doing in korn shell too complex
        > 4) Figured Perl my best option, but don't know Perl
        > 5) Bought The Perl CD Book Shelf

        I'm glad you're willing to pay for Perl material. However, according to:

        http://www.perlmonks.org/?node_id=522666

        Even the latest Perl CD bookshelf was out-of-date back then (in 2006), and even
        more so now.

        I would suggest you look into:

        * http://perl-tutorial.org/

        And later http://perl-begin.org/ and
        http://perl-begin.org/tutorials/bad-elements/ .

        > 6) Installed Strawberry Perl

        It's great that you're using Strawberry Perl instead of ActivePerl. Also see
        http://dwimperl.com/ which is based on Strawberry Perl and may make your life even easier.

        >
        > Output format is simple, but extracting the data I haven't a clue where to start.
        > I am starting to open the book today so any advise is welcome ( I am not trying to get someone to write this for me, just point me in the right direction )

        You should probably look into regular expressions and other forms of parsing.
        See:

        * http://perl-begin.org/topics/regular-expressions/

        * http://perl-begin.org/uses/text-parsing/

        Regards,

        Shlomi Fish

        > [SNIPPED]

        --
        -----------------------------------------------------------------
        Shlomi Fish http://www.shlomifish.org/
        List of Portability Libraries - http://shlom.in/port-libs

        God gave us two eyes and ten fingers so we will type five times as much as we
        read.

        Please reply to list if it's a mailing list post - http://shlom.in/reply .
      • Rob Richardson
        Schlomi, Thanks for your recommendations. I am quite behind the times. Why is Strawberry Perl better than ActivePerl? RobR
        Message 3 of 7 , Jul 2, 2012
        • 0 Attachment
          Schlomi,

          Thanks for your recommendations.

          I am quite behind the times. Why is Strawberry Perl better than ActivePerl?

          RobR
        • Phil Pinkerton
          Thanks I ll get started on your recommendations
          Message 4 of 7 , Jul 2, 2012
          • 0 Attachment
            Thanks I'll get started on your recommendations

            On Jul 2, 2012, at 10:36 AM, Shlomi Fish wrote:

            > Hi knowledgevision,
            >
            > first of all, I should note that you are likely to receive better help on
            > beginners@... :
            >
            > http://lists.perl.org/list/beginners.html
            >
            > On Mon, 02 Jul 2012 13:22:33 -0000
            > "knowledgevisionstaythirsty" <pcpinkerton@...> wrote:
            >
            >> 1) Assigned a task to extract data fron a text file.
            >> 2) Output file needs to be very specific, and created monthly
            >> 3) tried doing in korn shell too complex
            >> 4) Figured Perl my best option, but don't know Perl
            >> 5) Bought The Perl CD Book Shelf
            >
            > I'm glad you're willing to pay for Perl material. However, according to:
            >
            > http://www.perlmonks.org/?node_id=522666
            >
            > Even the latest Perl CD bookshelf was out-of-date back then (in 2006), and even
            > more so now.
            >
            > I would suggest you look into:
            >
            > * http://perl-tutorial.org/
            >
            > And later http://perl-begin.org/ and
            > http://perl-begin.org/tutorials/bad-elements/ .
            >
            >> 6) Installed Strawberry Perl
            >
            > It's great that you're using Strawberry Perl instead of ActivePerl. Also see
            > http://dwimperl.com/ which is based on Strawberry Perl and may make your life even easier.
            >
            >>
            >> Output format is simple, but extracting the data I haven't a clue where to start.
            >> I am starting to open the book today so any advise is welcome ( I am not trying to get someone to write this for me, just point me in the right direction )
            >
            > You should probably look into regular expressions and other forms of parsing.
            > See:
            >
            > * http://perl-begin.org/topics/regular-expressions/
            >
            > * http://perl-begin.org/uses/text-parsing/
            >
            > Regards,
            >
            > Shlomi Fish
            >
            >> [SNIPPED]
            >
            > --
            > -----------------------------------------------------------------
            > Shlomi Fish http://www.shlomifish.org/
            > List of Portability Libraries - http://shlom.in/port-libs
            >
            > God gave us two eyes and ten fingers so we will type five times as much as we
            > read.
            >
            > Please reply to list if it's a mailing list post - http://shlom.in/reply .
          • Shlomi Fish
            Hi Rob, On Mon, 2 Jul 2012 11:00:50 -0400 ... It s Shlomi . ... off the top of my head: 1. Strawberry Perl is open-source whereas ActivePerl is proprietary.
            Message 5 of 7 , Jul 2, 2012
            • 0 Attachment
              Hi Rob,

              On Mon, 2 Jul 2012 11:00:50 -0400
              Rob Richardson <CedricCicada@...> wrote:

              > Schlomi,

              It's "Shlomi".

              >
              > Thanks for your recommendations.
              >
              > I am quite behind the times. Why is Strawberry Perl better than ActivePerl?

              off the top of my head:

              1. Strawberry Perl is open-source whereas ActivePerl is proprietary.

              2. Strawberry Perl is maintained and supported by the community.

              3. Strawberry Perl allows you to easily install CPAN modules using the
              standard C compiler because it contains a MinGW build toolchain and other
              required tools and libraries.

              4. DWIM Perl, which is based on Strawberry, contains a large amount of other
              useful CPAN modules.

              5. Larry Wall uses Strawberry Perl when he's on Windows -
              http://strawberryperl.com/ . ;-)

              Regards,

              Shlomi Fish


              --
              -----------------------------------------------------------------
              Shlomi Fish http://www.shlomifish.org/
              Parody of "The Fountainhead" - http://shlom.in/towtf

              To have bugs is human; to fix them — divine.

              Please reply to list if it's a mailing list post - http://shlom.in/reply .
            • merlyn@stonehenge.com
              ... knowledgevisionstaythirsty 5) Bought The Perl CD Book Shelf The Perl CD Bookshelf is *quite* old (at least a decade and a half). You d be better off
              Message 6 of 7 , Jul 2, 2012
              • 0 Attachment
                >>>>> "knowledgevisionstaythirsty" == knowledgevisionstaythirsty <pcpinkerton@...> writes:

                knowledgevisionstaythirsty> 5) Bought The Perl CD Book Shelf

                The Perl CD Bookshelf is *quite* old (at least a decade and a half).
                You'd be better off subscribing to Safari (www.safaribooksonline.com) if
                you want up-to-date Perl books in an e-book form.

                --
                Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
                See http://methodsandmessages.posterous.com/ for Smalltalk discussion
              • Phil Pinkerton
                Oh well I only paid $5.00 Now I also have the Modern Perl 2011-2012 PDF version and various links. So far no success even in just doing a simple extraction of
                Message 7 of 7 , Jul 3, 2012
                • 0 Attachment
                  Oh well I only paid $5.00

                  Now I also have the Modern Perl 2011-2012 PDF version
                  and various links.

                  So far no success even in just doing a simple extraction of a users name and printing it.
                  can do easily in k-shell but not so in Perl yet.

                  On Jul 2, 2012, at 12:52 PM, Randal L. Schwartz wrote:

                  >>>>>> "knowledgevisionstaythirsty" == knowledgevisionstaythirsty <pcpinkerton@...> writes:
                  >
                  > knowledgevisionstaythirsty> 5) Bought The Perl CD Book Shelf
                  >
                  > The Perl CD Bookshelf is *quite* old (at least a decade and a half).
                  > You'd be better off subscribing to Safari (www.safaribooksonline.com) if
                  > you want up-to-date Perl books in an e-book form.
                  >
                  > --
                  > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
                  > <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
                  > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
                  > See http://methodsandmessages.posterous.com/ for Smalltalk discussion
                Your message has been successfully submitted and would be delivered to recipients shortly.