Let's suppose I've declared the following variables:
$ var='$test' $ test="my string"
If I print their contents I see the following:
$ echo $var $test $ echo $test my string
I'd like to find a way to print the content of the content of
$var (which is the content of
$test). So I tried to do the following:
$ echo $(echo $var) $test
But here the result is
$test and not
"my string"... Is it possible to print the content of the content of variables using bash?