Reputation: 11200
I would like make a associative array and as values I would like to have array with name like keyv.
For example:
#!/bin/zsh
$key='key'
typeset -A associative_array
typeset -a "${(p)key}v"
"${(p)key}v"=( value1 )
"${(p)key}v"+=( value2 )
associative_array[${key}]="${(p)key}v"
But I've got an error:
./test.sh:7: unknown file attribute:
which is on the line: "${(p)key}v"=( value1 )
Is there a way to do it?
Many thanks for advices.
Upvotes: 0
Views: 38