echo value inside a variable ?

Posted by Kimi on Stack Overflow See other posts from Stack Overflow or by Kimi
Published on 2010-06-09T15:37:30Z Indexed on 2010/06/09 15:42 UTC
Read the original article Hit count: 237

Filed under:
|
|
|
|

x=102 y=x

means when i echo $y it gives x echo $y x --and not 102

and when i echo $x it give 102

lets say I dnt know what is inside y

and i want the value of x to be echoed with using y someting like this

a=`echo $(echo $y)`
echo $a

Ans 102

© Stack Overflow or respective owner

Related posts about unix

Related posts about shell