I'm not entirely sure...it depends on the exact nature of your question.
See below

> Here is my part of script:
>
> Script:
>
> @replicas=`cleartool lsreplica -s`;
> foreach $rep (1..$#replicas)

I think this should be 0 .. $#replicas

>
>   {#print "$replicas[$rep] \n";
> print " $rep= $replicas[$rep] \n";
>   }
>
> print "For which replica do you like to SYNC\n";
> print "Make you choice\n";
> my $choice=<>;
> chomp$choice;
>
>
>
>
> When i execute this i get an output as follows:
>
>
>  1= BLR_ComEPR_ADT_Backup
>
>  2= GBG_ComEPR_ADT2
>
>  3= MAL_ComEPR_ADT2
>
>  4=

Is this supposed to be blank????

> Now my question if i say my choice is 4 , it should select
MAL2_ComEPR_ADT.
> so that i can do my further activity, how should i do that.?
> Eg `mt sync replica MAL2_ComEPR_ADT`

Are you asking why 4 is blank, or how to get MAL2_ComEPR_ADT assuming 4
isn't blank.

If it is the former, I think it is because you needed 0.. instead of 1..  If
it is the latter, then you can just say
my $value = $replicas[$choice];

Then you could say
`mt sync replica $value`

or, if you don't need the output:
system( "mt sync replica $value" );

Tanton
>
> Regards
> j@veed
>
> SIEMENS
> Bangalore, India.
> Tel: (Off) +91-80-8521122 Extn: 4919
>      (Dir) +91-80-8091919
> Fax: +91-80-8521337
>
>
>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to