From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1932 invoked from network); 15 Jan 2004 17:05:16 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Jan 2004 17:05:16 -0000 Received: (qmail 28755 invoked by alias); 15 Jan 2004 17:05:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19379 Received: (qmail 28734 invoked from network); 15 Jan 2004 17:05:07 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Jan 2004 17:05:07 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [204.127.202.64] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Jan 2004 17:5:7 -0000 Received: from naz.lickey.com (12-228-204-188.client.attbi.com[12.228.204.188]) by comcast.net (sccrmhc13) with ESMTP id <2004011517050601600ht6upe>; Thu, 15 Jan 2004 17:05:06 +0000 Received: by naz.lickey.com (Postfix, from userid 1000) id 0ED83189CC; Thu, 15 Jan 2004 09:05:06 -0800 (PST) To: zsh-workers@sunsite.dk Subject: Is there an idiom for converting an array to an associative array? From: Matt Armstrong Date: Thu, 15 Jan 2004 09:05:05 -0800 Message-ID: <87vfndnnwe.fsf@naz.lickey.com> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I'm looking for an idiom that will convert the array (a b c) into (a "" b "" c "") so I can assign it easily to an associative array. Right now I've got ugliness like this: array=(a b c) set -A assoc for i in $array; do assoc[$i]="" done Any pointers? -- matt