From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk (Zsh users list)
Subject: Re: creating associative arrays
Date: Wed, 12 Dec 2001 10:28:46 +0000 [thread overview]
Message-ID: <4466.1008152926@csr.com> (raw)
In-Reply-To: ""Akos Szalkai""'s message of "Tue, 11 Dec 2001 19:45:22 +0100." <20011211194522.A8605@2f.hu>
"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@csr.com> 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.
**********************************************************************
next prev parent reply other threads:[~2001-12-12 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-11 18:45 Akos Szalkai
2001-12-12 10:28 ` Peter Stephenson [this message]
2001-12-12 12:13 ` Akos Szalkai
2001-12-12 12:30 ` Akos Szalkai
2001-12-14 16:31 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4466.1008152926@csr.com \
--to=pws@csr.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).