加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

Perl Verify PMCoreBasedAD

发布时间:2020-12-16 00:22:17 所属栏目:大数据 来源:网络整理
导读:#!/usr/bin/perl -w use strict; use English; use Carp; ? ? ? ? ? ? ? ? use Getopt::Long; ? ? ?? use ReadConfFile; use PerformDBOperations; my ($confFile,$boolHelp) = (); my $boolError = GetOptions("c=s" = $confFile,? ? ? ? ? ? ? ? ? ? ? ?
#!/usr/bin/perl -w use strict; use English; use Carp; ? ? ? ? ? ? ? ? use Getopt::Long; ? ? ?? use ReadConfFile; use PerformDBOperations; my ($confFile,$boolHelp) = (); my $boolError = GetOptions("c=s" => $confFile,? ? ? ? ? ? ? ? ? ? ? ? ? ?"h|help!" => $boolHelp); if ($boolHelp || $confFile eq "") { ? Help(); ? exit(0); } eval? { ? # my $readConf = new ReadConfFile(); ? my $readConf = ReadConfFile->new(); ? my %confValues = $readConf->ReadConfFile($confFile); ? undef $readConf; ? while(my ($key,$value) = each %confValues) ? { ? ? print "$key => $valuen"; ? } }; if ($EVAL_ERROR) { ? print "Fail to read $confFile!n"; } eval { ? my $dbUser = "pmr"; ? chomp(my $pmrPwd = `polpasmx -$dbUser`); ? my $pmrDbPtr = new PerformDBOperations(); ? $pmrDbPtr->ConnectTo($dbUser,$pmrPwd); ? my $sql = "select co_gid,co_int_id,co_name,co_dn from utp_common_objects where co_dn like '%BRS%'"; ? my $sth = $pmrDbPtr->DoSQLStatement($sql); ? print "n-------------------------------------------------------------------------"; ? print "n|CO_GIDttt|CO_INT_IDt|CO_NAMEt|CO_DNtt|"; ? print "n-------------------------------------------------------------------------n"; ? while(my @arrRow = $sth->fetchrow()) ? { ? ? foreach(0..$#arrRow) ? ? { ? ? ? ?print "|".$arrRow[$_]."t"; ? ? } ? ? print "|n-------------------------------------------------------------------------n"; ? } }; sub Help ? ? ? ? { ? ? ?? ? print " Usage: perl VerifyPMCoreBasedAD.pl -c <ConfigFileName with full path> -m <test mode> -label <label to be used in result file names>n"; ? print "n Example: perl VerifyPMCoreBasedAD.pl -c /home/omc/test.cf -m 1 -label testrun n"; }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读