Welcome to the Monastery | |
PerlMonks |
Need help to build a frameworkby sriram83.life (Acolyte) |
on Feb 24, 2014 at 17:02 UTC ( [id://1076004]=perlquestion: print w/replies, xml ) | Need Help?? |
sriram83.life has asked for the wisdom of the Perl Monks concerning the following question: 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.
Back to
Seekers of Perl Wisdom
|
|