Hi all,
I have somme different variables sequentialy named like:
VAR1=8
VAR2=9
VAR3=10
i'd like tu deduce my variable name from a resolution of two others like that:
NMBR=1
NAME=VAR
while [ NMBR -ne 10 ]
do
TEST=$NAME$NMBR
echo $TEST
let NMBR=NMBR+1
done
Logically the $TEST value in the 'echo' line is VAR2 for example.
Is there a solution get the value of the concatenated variable in this example i'd like to have 9 (value of VAR2) instead of the name VAR2.
I hope i'm juste as clear as you need )
Thank's in advance
I have somme different variables sequentialy named like:
VAR1=8
VAR2=9
VAR3=10
i'd like tu deduce my variable name from a resolution of two others like that:
NMBR=1
NAME=VAR
while [ NMBR -ne 10 ]
do
TEST=$NAME$NMBR
echo $TEST
let NMBR=NMBR+1
done
Logically the $TEST value in the 'echo' line is VAR2 for example.
Is there a solution get the value of the concatenated variable in this example i'd like to have 9 (value of VAR2) instead of the name VAR2.
I hope i'm juste as clear as you need )
Thank's in advance