[clue-tech] bash tip

David L. Anselmi anselmi at anselmi.us
Sun Nov 27 19:11:39 MST 2005


It's also in bash(1) under "Parameter Expansion" and is referred to as 
indirect expansion.

Dennis J Perkins wrote:
> In an article.  I think it's in Linux Format magazine.
> 
> 
> On Sun, 2005-11-27 at 11:02 -0700, Jef Barnhart wrote:
> 
>>Where did you find this?
>>
>>Jef
>>
>>
>>On Wed, 23 Nov 2005 12:00:37 -0700 (MST)
>>dperkins at frii.com wrote:
>>
>>
>>>Those of you who do bash scripting might find this useful.
>>>You can treat the contents of a variable as a pointer to another variable.
>>>
>>>a=17
>>>b=a
>>>
>>>echo $a     prints 17
>>>echo $b     prints a
>>>
>>>echo ${!b}  prints 17
>>>
>>>
>>>_______________________________________________
>>>CLUE-tech mailing list
>>>CLUE-tech at cluedenver.org
>>>http://cluedenver.org/mailman/listinfo/clue-tech
>>
>>_______________________________________________
>>CLUE-tech mailing list
>>CLUE-tech at cluedenver.org
>>http://cluedenver.org/mailman/listinfo/clue-tech
> 
> 
> _______________________________________________
> CLUE-tech mailing list
> CLUE-tech at cluedenver.org
> http://cluedenver.org/mailman/listinfo/clue-tech
> 

_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list