HI, I am trying to write a script in Perl which will create a clearcase view (dynamic) and also set the config spec from a file. But when i run the script, it terminates just after creating the view and not proceeding with further commands (Probably because of a new shell). Can you please help me in fixing this. My code is mentioned below
My Apologies if i am posting this in the wrong forum/section. Regards, Perl Noob !.. Venu#!/opt/trs/apps/bin/perl -w use strict; my $usr=`whoami`; print " User is $usr "; my $ct = '/usr/atria/bin/cleartool'; chomp($usr); #my $viewtag = $usr."-pal-rel"; my $viewtag="palmida-rel"; my $bl_name = $ARGV[0]; my $cs_file = "/tmp/$usr-cc-cs.txt"; print " the BL is $bl_name \n"; open (my $file, ">", "$cs_file") || die ("No Config Spec file"); #print MYFILE "element * CHECKEDOUT \nelement * /main/LATEST"; print $file "element * $bl_name \n"; close ($file); print $file; sub usage { print " USAGE: \n Please Run the script as shown below. \n perl /home +/venn/MyPerl/pal.pl <BL NAME> \n"; } #&usage(); print " $viewtag \n"; #system(sprintf("%s mkview -tag %s -stgloc viewstg_bheecc18; %s setvie +w %s", $ct, $viewtag, $ct, $viewtag)); #system ("$ct mkview -tag $viewtag -stgloc viewstg_bheecc18; $ct setvi +ew $viewtag; $ct catcs"); system ("$ct mkview -tag $viewtag -stgloc viewstg_bheecc18;"); system ("$ct setview $viewtag; $ct setcs $cs_file"); system ("$ct setview $viewtag; $ct catcs");
In reply to Execute multiple clearcase commands in Perl Script by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |