# vars in vars



## nORKy (Jul 2, 2013)

Hi, 

_T_his code*:*

```
_if="eth0"
eval _ifconf_${_if}_ip="1.1.1.1"

echo $_ifconf_${_if}_ip
```
doesn't work.

`echo print` 

```
eth0_ip
```

I want the 1.1.1.1 as _a_ result. Can you help m_e_ to understand*?*

Thanks you*.*


----------



## Dies_Irae (Jul 2, 2013)

Try this:


```
eval echo \$_ifconf_${_if}_ip
```


----------



## nORKy (Jul 2, 2013)

thanks you
Thank you.


----------

