bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using variables in variables names


From: Paul Jarc
Subject: Re: Using variables in variables names
Date: Mon, 13 Mar 2006 15:58:26 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

"Dirk H. Schulz" <dirk.schulz@kinzesberg.de> 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"


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]