I have a loop in a script where I am trying to combine the values of two variables but I am having trouble with the syntax (see attached or below).
I have one set of variables called $spc1, $spc2, $spc3, etc. set to a text values ("PW", "PR", etc.)
I have another variable called $counter set to a numeric value that is incremented inside of a loop (1, 2, etc.).
I am trying to increment the number value in the first variable by using the $counter variable in the loop.
Inside of the loop I am trying to set a 3rd variable called $spcloop to be a combination of $spc1 and $counter so that $spcloop becomes PW, PR, etc as it moves through the loops.
I tried the following without success:
Set Variable [$spcloop: Value: $&"spc"&"$counter"]
Set Variable [$spcloop: Value: $&"spc"&$counter]
Set Variable [$spcloop: Value: $&"spc$counter"]
Any assistance would be appreciated.