vars in vars

Hi,

This code:
Code:
_if="eth0"
eval _ifconf_${_if}_ip="1.1.1.1"

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

echo print
Code:
eth0_ip

I want the 1.1.1.1 as a result. Can you help me to understand?

Thanks you.
 
Back
Top