perl - neglect warnings in open 3 HANDLE_OUT -


this question exact duplicate of:

i executing open 3 shown below getting below lines sysout sysout

   <may 7, 2013 1:21:59 ist> <info> <security> <bea-090905> <disabling cryptoj jce provider self-integrity check better startup performance. enable check, specify -dweblogic.security.allowcryptojdefaultjceverification=true>      <may 7, 2013 1:21:59 ist> <info> <security> <bea-090906> <changing default random number generator in rsa cryptoj ecdrbg fips186prng. disable change, specify -dweblogic.security.allowcryptojdefaultprng=true>      <may 7, 2013 1:21:59 ist> <notice> <security> <bea-090898> <ignoring trusted ca certificate "cn=certgenca,ou=for testing only,o=myorganization,l=mytown,st=mystate,c=ka". loading of trusted certificate list raised certificate parsing exception pkix: unsupported oid in algorithmidentifier object: 1.2.840.113549.1.1.11.>  

my expected string

<composites>     i=0     compositedetail=swlib:soaprov/soacomposite=eis/fileadapter#eis/fileadapter#     swlib:soaprov/soacomposite=eis/fileadapter#eis/fileadapter# starts swlib     </composites> 

i want ignore lines bea security , print expected string .how can it?

my $command = $java . ' -classpath ' . $classpath . ' ' . $secoptions . ' ' . $classname . ' ' . $serviceurl . ' ' . $composites;

 local (*handle_in, *handle_out, *handle_err);        $pid = open3( *handle_in, *handle_out, *handle_err, "$command") ;      $nextline;     while(<handle_out>) {                $nextline= $_;           print $nextline;   } 

you use regexps that. of course use kind of xml parser too, overkill in case.

my $debug = 1;#set 1 debugging while(my $nextline=<handle_out>) {              chomp($nextline);         if ($nextline =~ m!<bea-!){            print "skipping line (bea): |$nextline|\n" if $debug;         }         print $nextline."\n"; 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -