bug-bash
[Top][All Lists]
Advanced

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

Re: How to do? Possible?


From: Dennis Williamson
Subject: Re: How to do? Possible?
Date: Tue, 26 Jul 2011 00:16:51 -0500

Sorry, I overlooked the indirection (and the missing semicolon).

On Mon, Jul 25, 2011 at 10:18 PM, Bob Proulx <bob@proulx.com> wrote:
> Dennis Williamson wrote:
>> Linda Walsh wrote:
>> > GLOBAL="hi there"
>> > {foo=GLOBAL echo ${!foo}; }
>
> Note that this tickles a problem since foo isn't set before $foo is
> expanded.  Use this following with a semicolon instead:
>
>  GLOBAL="hi there"
>  {foo=$GLOBAL; echo ${!foo}; }
>
>> You had a missing dollar sign.
>>
>> I'm assuming you meant:
>>
>> GLOBAL="hi there"
>> {foo=$GLOBAL echo ${!foo}; }
>
> Er..  No.  There is a missing semicolon as described above and in
> other messages in the thread but the dollar size is intended to be
> excluded so that foo contains the string "GLOBAL" and ${!foo} will
> indirect through it.
> . . .
> Bob
>



-- 
Visit serverfault.com to get your system administration questions answered.



reply via email to

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