Shell script to print value of variable recursively

Viewed 41
#!/bin/bash
A="X"
X="Y"
B=${$A}
echo $B # expecting output to be 'Y'

Actual output seen : line 4: ${$A}: bad substitution

1 Answers
Related