Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: creating associative arrays
- X-seq: zsh-users 4532
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx (Zsh users list)
- Subject: Re: creating associative arrays
- Date: Wed, 12 Dec 2001 10:28:46 +0000
- In-reply-to: ""Akos Szalkai""'s message of "Tue, 11 Dec 2001 19:45:22 +0100." <20011211194522.A8605@xxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
"Akos Szalkai" wrote:
> 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.
There's not much that can go wrong there, if filename is set to array.txt
and that contains an even number of words. Are you sure it is and does?
Sorry, I don't think this is very helpful...
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author