Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

indirect assignment to array



Hello, I'm trying to assign the content of an array to another which name
is contained in a variable
What I tried:

varname=newarray
typeset -a array=(1 2 3)
typeset -a $varname=($array)

but I get an
zsh: bad pattern: newarray=(1

are there other methods to do indirect assignment that allow me to do this?

thanks

Pier Paolo Grassi


Messages sorted by: Reverse Date, Date, Thread, Author