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 treated as an assignment. This will work:
ac=12 eval "dings$ac=wasannersder"
And how do I reference it then?
ac=12
eval "dings$ac=wasannersder"
echo $dings12
wasannersder # that works
echo $('$dings'$ac) # trying to
substitute $ac before $dings...
-bash: $dings12: command not found
Is there any way to reference it without anticipating the result of
indirect referencing?
Dirk
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash