perladdict has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am working on a task to automate the build system logfiles
the fallowing are the directory structure that i have to navigate to get the log files.
/remote/scm/builds/$arg/Formal/4.0.0.0.29
like above path there are total 4 directories in the path /remote/scm/builds/$arg/FailedFormal
/remote/scm/builds/$arg/Informal
/remote/scm/builds/$arg/FailedInformal
Each of the end directory represents Build release number, logfile for that release is in that directory.
First i am trying for Formal builds,it contains more then 10 release amnog them i have to get only the last three relese log files to get the status information from
logfiles.Below is the code i am trying but i unable to change the directory path to the release directory(4.0.0.29)
the directory structure is as below
/remote/scm/builds
bash> ls /remote/scm/builds
bash>cd Formal
bash>ls
4.0.0.0.28 4.0.0.0.29 4.0.0.0.30
bash>cd 4.0.0.0.29
bash>ls
build.html build.log
the output i am getting after running the above code is as below
bash>perl prog.pl v_dialer
The main objective of this task is to get the last three relese log files for a specific product to find the staus information.
This problem seems to easy for expert monks but for me i am not getting any ideas how to start.
Keeps pouring your ideas....
I am working on a task to automate the build system logfiles
the fallowing are the directory structure that i have to navigate to get the log files.
/remote/scm/builds/$arg/Formal/4.0.0.0.29
like above path there are total 4 directories in the path /remote/scm/builds/$arg/FailedFormal
/remote/scm/builds/$arg/Informal
/remote/scm/builds/$arg/FailedInformal
Each of the end directory represents Build release number, logfile for that release is in that directory.
First i am trying for Formal builds,it contains more then 10 release amnog them i have to get only the last three relese log files to get the status information from
logfiles.Below is the code i am trying but i unable to change the directory path to the release directory(4.0.0.29)
Here conffile.txt is the input for the script the format of this file is as below#!/usr/bin/perl $arg=$ARGV[0]; &navigate; &asd; sub navigate { @vobtag=`cut -d ";" -f1 conffile.txt`; print "@vobtag\n"; } sub asd { $arg=$ARGV[0]; $path="/remote/scm/builds/$arg/Formal"; chdir($path); @array=`ls `; print @array; }
First field from this file is an argument to the script/vobs/ivr;IR:IVR;IVR;Interactive Response /v_dialer;APC:Dialer;APC;Avaya Proactive Contact /v_dialermidtier;APC:Supervisor;APC;Avaya Proactive Contact /v_dialerclient;APC:Agent;APC;Avaya Proactive Contact /vob1;SBL;Siebel;Siebel
the directory structure is as below
/remote/scm/builds
bash> ls /remote/scm/builds
bash>cd v_dialerbt coreservices cs_licgen HCC IVRD ivr_vw_win v_dialer v_dialermidtier vob1 IVRD
bash>cd Formal
bash>ls
4.0.0.0.28 4.0.0.0.29 4.0.0.0.30
bash>cd 4.0.0.0.29
bash>ls
build.html build.log
the output i am getting after running the above code is as below
bash>perl prog.pl v_dialer
Can any one help me out to navigate up to the log file of the relese directory.../vobs/ivr /v_dialer /v_dialermidtier /v_dialerclient /vob1 4.0.0.0.28 4.0.0.0.29 4.0.0.0.30
The main objective of this task is to get the last three relese log files for a specific product to find the staus information.
This problem seems to easy for expert monks but for me i am not getting any ideas how to start.
Keeps pouring your ideas....
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to start automation to open the last three logfiles to get build information
by toolic (Bishop) on Jul 10, 2007 at 21:20 UTC |
Back to
Seekers of Perl Wisdom