Hi folks,
I'm having a little problem.
For exambe in ksh:
$ z=0
$ y=1
$ x=aaaa
$ eval `echo MACHINE_DISK$z[$y]`=$x
$ echo ${MACHINE_DISK0[1]}
aaaa
My problem is getting back the value of the variable using variables to
refer to the variable name (confusing). I.e $MACHINE_DISK$z[$y] .
Using ${} works great when you only have a simple array but adding a
variable in the middle of the variable name seems to ruin it.
$ echo ${MACHINE_DISK0[$y]}
aaaa
$ echo ${MACHINE_DISK$z[$y]}
ksh: ${MACHINE_DISK$z[$y]}: bad substitution
Thanks in advance for any tip
Cheers
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questionsTo unsubscribe, send any mail to "
freebsd-questions-unsubscribe@..."