jevaly has asked for the wisdom of the Perl Monks concerning the following question:
#! perl -w use strict; use warnings; use Carp; use DBI; use DBD::Oracle qw(:ora_types); my %env_hash; my $os = 'solaris'; my $stringetje; my $temp; my @tempar; my @wkflist; my $PARAMETER; $env_hash{$os} = {parfile => '/ontw/data/powercenter8/PRJ10/BMRK.par', del => 'rm -f ', files => 'wf_BMRK*.out'}; open($PARAMETER, '<', "$env_hash{$os}{parfile}") or croak "\nCould not + open parameterfile $env_hash{$os}{parfile}"; while($temp = <$PARAMETER>){ chomp($temp); @tempar = split /=/, $temp; if($tempar[0] eq "WKFLIST"){ @wkflist = split /,/,$tempar[-1]; } else{ $env_hash{$os}{$tempar[0]} = $tempar[-1]; } } close $PARAMETER; $stringetje = $env_hash{$os}{del} . $env_hash{$os}{LOGDIR} . $env_hash +{$os}{files}; print "\n\n\n\n******************************************************\ +n"; print "\nFirst part of the concatenation: delete command : $env_hash{$ +os}{del}"; print "\nSecond part of the concatenation: path : $env_hash{$os}{LOGDI +R}"; print "\nThird part of the concatenation: file wildcard : $env_hash{$o +s}{files}"; print "\nThe resulting concatenation: $stringetje"; print "\n******************************************************\n\n\n\ +n";
TIMES=4 LOGDIR=/ontw/log/powercenter8/PRJ10/ TMPDIR=/ontw/data/powercenter8/Tmp/PRJ10 FOLDER=BMRK SERVICE=IS_PRJ10 DOMAIN=Domain_ONT USER=Administrator PASSWORD=********** WKFLIST="wf_BMRK_File2File_Fixed","wf_BMRK_File2File_Fixed_No_Target", +"wf_BMRK_File2File_Delimited","wf_BMRK_File2File_Memory","wf_BMRK_Fil +e2File_CPU" ORAUSER=jamb_007 ORAPSW=********** ORACONNECT=dow02.ont.jon.mg
****************************************************** First part of the concatenation: delete command : rm -f Second part of the concatenation: path : /ontw/log/powercenter8/PRJ10/ Third part of the concatenation: file wildcard : wf_BMRK*.out wf_BMRK*.outg concatenation: rm -f /ontw/log/powercenter8/PRJ10/ ******************************************************
****************************************************** First part of the concatenation: delete command : rm -f Second part of the concatenation: path : /ontw/log/powercenter8/PRJ10/ Third part of the concatenation: file wildcard : wf_BMRK*.out The resulting concatenation: rm - f /ontw/log/powercenter8/PRJ10/wf_BM +RK*.out ******************************************************
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Concat strings from parameter file
by almut (Canon) on Dec 08, 2009 at 09:36 UTC | |
by jevaly (Sexton) on Dec 08, 2009 at 09:46 UTC | |
by almut (Canon) on Dec 08, 2009 at 09:56 UTC | |
by ph0enix (Friar) on Dec 08, 2009 at 09:57 UTC | |
by roboticus (Chancellor) on Dec 08, 2009 at 15:43 UTC | |
|
Re: Concat strings from parameter file
by ph0enix (Friar) on Dec 08, 2009 at 09:49 UTC |