On Fri, Jun 6, 2014 at 11:52 PM, ToddAndMargo <toddandma...@zoho.com> wrote:
> Hi All,
>
> In Bash script language, how do I create a variable name
> from a variable?
>
> I am trying to create a variable called "abcStatus"
>
> x=abc
> $xStatus=xyz
>
> obviously doesn't work.  What am I doing wrong?
>
> Many thanks,
> -T

It's not really core to Scientific Linux itself, but:

For most bash cases where I've found myself wanting something like
this, I've usually wound up using "hashes" instead. The first hash,
abc, contains a list of variable names, abcstatus, abctime, abcdate,
abcowner, etc. that can then be referrenced to refer to other valures
or hashes as needed.

Reply via email to