SCIENTIFIC-LINUX-USERS Archives

June 2014

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Brandon Vincent <[log in to unmask]>
Reply To:
Brandon Vincent <[log in to unmask]>
Date:
Sat, 7 Jun 2014 04:14:41 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
There is probably a better way, (bash declare perhaps?), but:

x=abc
eval $(echo $x)Status="This works!"

Brandon Vincent

On Sat, Jun 7, 2014 at 3:52 AM, ToddAndMargo <[log in to unmask]> 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

ATOM RSS1 RSS2