Hi folks,
I am sure this has been asked quite some times, but I did not find
anything inspiring or helpful - in fact not too much at all.
For accelerating a script I need the possibility to set up an unknown
number of arrays and to name them (at least partly) with values of a
variable. It is
"Dirk H. Schulz" <[EMAIL PROTECTED]> wrote:
>> ac=12 dings$ac=wasannersder
>> -bash: dings12=wasannersder: command not found
Variable names in assignments are not subject to expansion. So since
"dings$ac", as-is, does not fit the syntax for variable names, it
isn't treated as an assignment. Thi
Paul Jarc schrieb:
"Dirk H. Schulz" <[EMAIL PROTECTED]> wrote:
ac=12 dings$ac=wasannersder
-bash: dings12=wasannersder: command not found
Variable names in assignments are not subject to expansion. So since
"dings$ac", as-is, does not fit the syntax for variable names, it
isn't tr
"Dirk H. Schulz" <[EMAIL PROTECTED]> wrote:
> Paul Jarc schrieb:
>> ac=12 eval "dings$ac=wasannersder"
>
> And how do I reference it then?
ac=12 eval "value=\$dings$ac"
echo $value
Or:
ac=12 name=dings$ac echo ${!name}
paul
___
Bug-bash mailing lis
On 3/13/06, Paul Jarc <[EMAIL PROTECTED]> wrote:
> "Dirk H. Schulz" <[EMAIL PROTECTED]> wrote:
> > Paul Jarc schrieb:
> >> ac=12 eval "dings$ac=wasannersder"
> >
> > And how do I reference it then?
>
> ac=12 eval "value=\$dings$ac"
> echo $value
>
> Or:
>
> ac=12 name=dings$ac echo ${!name}
It see