Resolve parameter value stored in a variable

Hi All,

I have below variable,

xyz=\$AI_XFR

Now, if you will run the below command

=> echo $xyz
$AI_XFR

It is returning hardcoded string value.

Whereas in environment, there is value in it. Like below:

=> echo $AI_XFR
/home/aditya/sandbox/xfr/

I need to resolve this value using variable '$xyz'.

Please suggest.

Thanks,
Aditya Gangwar

You could use eval

Hi,

Can you please tell in detail,
I have hardcoded value $AI_XFR in variable 'xyz'
and now i want to resolve the value with 'xyz' variable only.

Thanks,
Aditya

eval echo $xyz
1 Like

Thanks a lot:)