help-bash
[
Top
][
All Lists
]
Advanced
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
[Help-bash] array indirection
From
:
Bill Gradwohl
Subject
:
[Help-bash] array indirection
Date
:
Fri, 4 May 2012 18:20:46 -0600
Can anyone explain why one pass of this loop works and then fails.
If it didn't work at all, or worked all the time I could understand, but working once and then quitting is confusing.
array=(11 12 13 14 15)
variableName='array'
for ((x=0; x<address@hidden; ++x)); do
echo "array[${x}]=${!variableName[$x]}"
done
==================
Produces:
address@hidden 01.ycc# ./tst pass3
array[0]=11
./tst: line 33: !variableName[$x]: unbound variable
--
Bill Gradwohl
reply via email to
[Prev in Thread]
Current Thread
[
Next in Thread
]
[Help-bash] array indirection
,
Bill Gradwohl
<=
Re: [Help-bash] array indirection
,
John Kearney
,
2012/05/04
Re: [Help-bash] array indirection
,
John Kearney
,
2012/05/04
Re: [Help-bash] array indirection
,
Bill Gradwohl
,
2012/05/04
Re: [Help-bash] array indirection
,
Dan Douglas
,
2012/05/04
Prev by Date:
Re: [Help-bash] Can anyone explain this?
Next by Date:
Re: [Help-bash] Can anyone explain this?
Previous by thread:
[Help-bash] Can anyone explain this?
Next by thread:
Re: [Help-bash] array indirection
Index(es):
Date
Thread