kumar has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: need scripts to scan directories and interpret results
by jdporter (Paladin) on Feb 16, 2003 at 19:28 UTC
    Welcome to PerlMonks, kumar.

    You may find that you'll have a better experience with PerlMonks if you take a little time to get to know how things work around here first. I highly encourage you to read the Tutorials, and especially the first section, "Welcome to the Monastery", which has some good pointers on how to ask questions effectively. (More links on the subject can be found on ybiC's homenode, section 2. Question-asking.)

    jdporter
    The 6th Rule of Perl Club is -- There is no Rule #6.

      I am new to this site. Can i award points to the person who helps to solve my doubt. Anyway thanks for your comment.
        Hi, kumar. Since you are an initiate monk at the moment, you do not have votes. If you can accumulate 20 points you will be able to advance to the next level. Then you will have 5 votes a day to award to posts you like. See Voting/Experience System for more details.

        You will find it easier to advance if you follow the advice the others have suggested about posting good questions. At the moment your experience points are in the negative, probably from downvotes on this question.

Re: need scripts to scan directories and interpret results
by fuzzyping (Chaplain) on Feb 16, 2003 at 19:52 UTC
    You'll find your solution here.

    -fp
Re: need scripts to scan directories and interpret results
by tachyon (Chancellor) on Feb 17, 2003 at 00:07 UTC

    Welcome to PerlMonks a place where those who try to help themselves first get far more help than those who want free code written for them. You probably want something like this. I will put in as much effort on documentation and explanation as you have with posting code. Uncomment the `bactic shell code` only after you have done a dry run so you can see what it plans to execute. You can save a lot of time with scripting.....or create the most enormous disaster in no time flat.

    #!/usr/bin/perl @users = glob("/home/sites/$ARGV[0]/users/*"); @mail = glob("/home/spool/mail/*"); @mail{@mail} = @mail; for my $userpath ( @users ) { my ($username) = $userpath =~ m!([^/]+)$!; next unless $mail{"/home/spool/mail/$username"}; print "Copying $username.....\n"; print "Plan: /bin/cp /home/spool/mail/$username /home/sites/home/w +eb/move\n"; #`/bin/cp /home/spool/mail/$username /home/sites/home/web/move`; }

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      Thanks a lot for your help. Excellent Performance. I am new to this site... so i don't have any idea to award points/grade to the help. Could you please help me to solve my second part? Thanks and regards

        I wrote New Monks a couple of years ago which is as good a place to start as any. Also Guide to the Monastery and Perl Monks Site FAQ and Site How To

        Just a hint. If you post code, even really really bad code, you tend to get more help than if you just state a problem and ask for a solution. Most of us are PAID to deliver solutions. We offer help as a gesture of good will (or we do it on the bosses time ;-) Hey wait a minute. I am the boss.

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print