On Fri, Nov 04, 2016 at 07:31:54PM +0100, Christof Warlich wrote:
> Hi,
> a quick question: Please consider the following script:
> #!/bin/bash
> xxx=(hi ho)
> indirection=xxx
> echo ${!indirection} # Works as expected.
> echo address@hidden # Doesn't work. How to print the entire array?
In bash 4.3 or 4.3, use typeset -n to create a name reference.
imadev:~$ a=(this is a real array)
imadev:~$ typeset -n ref=a
imadev:~$ echo "address@hidden"
this is a real array