Hello PerlMonks, I am an intermediate user of perl and am familiar with writing small scripts and perl one-liners. Now, I got a new challenge to build a framework on linux platform,which should extract a .tar file or a .zip or .jar file or a .war file or a .ear file recursively and then find a specific file pattern i give as an input to the framework. For example,in my project i need to find all .SYS2 files,.sys and .swtag files with in the extracted .tar file or a .zip file etc.. Also, i need to find the filenames that contain string i give as input.

This is my approach:

My idea is to build a MAIN script that takes three inputs:

1. my .tar or .zip file as input file.

2. file patterns i need to find inside the archives(.jar or .war or .ear should also be extracted inside the archives recursively to find the .SYS2 file,.sys or .swtag files).

3. string that i need to find inside a file inside the archives.

Add plugin scripts to the main script and call them when needed.

1.write tar.pl to extract tar file

2.write zip.pl to extract zip file

3.write jar.pl to extract jar file

Pass all the extracted files to main script to find files i need and the filename which contains the string i need. A final report should be generated that gives all the file patterns that are found and the file names that contain the string i need. Also, i need to write main.log which should record all the plugin scripts logs with its own logging. Please guide me, it is urgent.


In reply to Need help to build a framework by sriram83.life

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.