I wanted to verify that this behavior is intended, as I can't find it
described in the manual.

$ echo $BASH_VERSION
4.3.30(1)-release
$ foo=bar
$ echo $foo
bar
$ bar=123
$ echo $bar
123
$ typeset -n foo
$ echo $foo
123
$ echo ${!foo}        # this is what I want to verify
bar

Is using ${!foo} intended to yield the name of the var that foo references,
now that foo has been turned into a nameref?  I wanted to use this
functionality in a script, but wanted to make sure it was intentional
before I rely on it.

Thanks,

-Jonathan Hankins


-- 
------------------------------------------------------------------------
Jonathan Hankins    Homewood City Schools

The simplest thought, like the concept of the number one,
has an elaborate logical underpinning. - Carl Sagan

jhank...@homewood.k12.al.us
------------------------------------------------------------------------

Reply via email to