Hi

I came across a script that did

$ VARIABLE1=value1
$ VARIABLE2=value2
$ for VAR in VARIABLE1 VARIABLE2
> do
> echo ${VAR}=${!VAR}
> done
VARIABLE1=value1
VARIABLE2=value2

I was unfamiliar with ${!VAR}.  As far as I can tell, it's not documented in 
the man page or the info pages.

I assume it was imported from Korn Shell
http://www.research.att.com/sw/download/man/man1/ksh.html

        ${!vname }
                Expands to the name of the variable referred to by
                vname. This will be vname  except when vname  is a name
                reference.




Reply via email to