Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
creating associative arrays
- X-seq: zsh-users 4531
- From: "Akos Szalkai" <szalkai@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: creating associative arrays
- Date: Tue, 11 Dec 2001 19:45:22 +0100
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Hello,
I am trying to fill an associative array from a file. If the name of
the file is fixed, e.g. array.txt then the following works:
: ${(AA)dict::=$(<array.txt)}
However, if the filename is given in a parameter then the command:
: ${(AA)dict::=$(<${filename})}
gives the error
zsh: bad set of key/value pairs for associative array.
I guess I am mixing up some kind of expansion order, so could somebody
help?
Thanks in advance,
Akos
Messages sorted by:
Reverse Date,
Date,
Thread,
Author