[clue-tech] bash tip

Matt Gushee matt at gushee.net
Wed Nov 23 12:11:49 MST 2005


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

That's cool, and maybe useful.

Bash is really a pretty amazing tool. There was a book around in the
late 90s called something like _Shell Objects_. Yes, that means what it
sounds like--that you could do object-oriented programming with the
shell (which one? I don't remember clearly, but I think it was mainly
about Bash). I was intrigued, but not quite enough to actually buy it.

-- 
Matt Gushee
The Reluctant Geek: http://matt.gushee.net/rg/
_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list