Hi all,

This is a request.
I need a scripts to run in a command prompt. My requirement is as follows:

  1. I would like to pass a domain name into a script like "perl script.pl argument1" and have it scan "/home/sites/argument1/users", then scan "/home/spool/mail" , then copy all matches to "/home/sites/home/web/move" , and then chmod each file in that directory to 644.
  2. This script needs to work with the results of previous script . I need it to scan the directory "mail/argument1" for each username(the users in that directory will match the files you copied in script1 (previous script)), then do "get http://192.168.0.1/move/username", and then rename the file downloaded to "inbox" . This should be done for each user found in "mail/argument1" . Here is a quick run through:
Before move:
mail/argument1/xya/inbox mail/argument1/xyb/inbox mail/argument1/xyc/inbox
During middle of move:
mail/argument1/xya/inbox/xya mail/argument1/xyb/inbox/xyb mail/argument1/xyc/inbox/xyc
After the renaming of the files:
mail/argument1/xya/inbox mail/argument1/xyb/inbox mail/argument1/xyc/inbox
Could you pls write a code for 1 and 2.
Waiting for help from all experts

Regards,
Kumar.

20030216 Edit by Corion : Added formatting

20030217 Edit by broquaint : title change (was Could you pls help me)


In reply to need scripts to scan directories and interpret results by kumar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.