I'm writing a function that will script the generation of the ifconfig
subdirs. The problem is that I'm trying to expand the value of a
variable where the variable name itself is a variable. EX:
eth0_onboot=yes
eth1_onboot=no
The relevant part of the function is this:
mknet ()
{
Dont know how to expand this variable, but maybe you should use arrays.
to declare an array:
declare -a OnBootEth
and to use:
OnBootEth[ 0 ]=yes
OnBootEth[ 1 ]=no
if [ yes == OnBootEth[ 1 ]
--- Archaic [EMAIL PROTECTED] wrote:
I'm writing a function that will script the generation of the ifconfig
subdirs. The problem is that I'm trying to expand the value of a
variable where the variable name itself is a variable.
The bash (1) manpage calls this indirection; it is described in
Archaic wrote:
I'm writing a function that will script the generation of the ifconfig
subdirs. The problem is that I'm trying to expand the value of a
variable where the variable name itself is a variable. EX:
eth0_onboot=yes
eth1_onboot=no
The relevant part of the function is this:
mknet ()