bash scripting help needed

2005-09-25 Thread Archaic
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 () {

Re: bash scripting help needed

2005-09-25 Thread Carlos Eduardo de Brito Novaes
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 ]

Re: bash scripting help needed

2005-09-25 Thread Brandin Creech
--- 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

Re: bash scripting help needed

2005-09-25 Thread Dan McGhee
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 ()