Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:30

0001 \#! /usr/bin/perl
0002 
0003 use Getopt::Long;
0004 my ($myfile);
0005 GetOptions( 
0006         "myfile:s" => \$myfile,
0007         "user:s" => \$user,
0008         "password:s" => \$password,
0009         "db:s" => \$db,
0010 
0011       );
0012 if(!$myfile or !$user or !$password or !$db){
0013     die "perl update_tag.pl -myfile list_tag.txt -user CMS_COND_STRIP -db cms_orcoff_int2r -password xxxxxxxxxxx\n";
0014 }
0015 
0016 unless(-e $myfile){die "Il file specificato doesn't exit\n"; }
0017 
0018 open (TAG,$myfile);
0019 while ($item_tag = <TAG>){
0020     chomp($item_tag);
0021     $item_tag_mod=$item_tag."_mc";
0022     @pass=`echo "update metadata set name='$item_tag\_mc' where name='$item_tag';" | sqlplus $user\@$db/$password`;
0023     print @pass;
0024 }
0025 close TAG;