Let's say I have an environment variable called test1 whose value is test_value. How can I display test_value by using another variable $target='test1'?
Here are what I've tried:
$target='test1'
echo $env:$target
echo $env:$($target)
echo "$env:$target"
All of the 3 methods above fail to display test_value. How can I achieve my goal?