Hi folks,
I'm not sure how to explain my problem ...
I'm using a lot of variables. Let's say e.G.
Next I do something like:
Where "input" can be "AA", "BB", "CC".
Now the tricky part is:
I'd like to get the content of the variable name I entered into the input variable so that if someone enters "AA" the echo would produce me a "Hello" on screen.
I tried something like this:
But this would only give me the following in return:
Any ideas ?
Regards,
Thomas
I'm not sure how to explain my problem ...
I'm using a lot of variables. Let's say e.G.
Code:
AA=Hello
BB=How
CC=Where
Next I do something like:
Code:
read input
Where "input" can be "AA", "BB", "CC".
Now the tricky part is:
I'd like to get the content of the variable name I entered into the input variable so that if someone enters "AA" the echo would produce me a "Hello" on screen.
I tried something like this:
Code:
echo \$$input
But this would only give me the following in return:
Code:
$AA
Any ideas ?
Regards,
Thomas