From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19812 invoked from network); 19 Feb 2004 17:28:29 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 19 Feb 2004 17:28:29 -0000 Received: (qmail 1466 invoked by alias); 19 Feb 2004 17:28:14 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7066 Received: (qmail 1431 invoked from network); 19 Feb 2004 17:28:13 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 19 Feb 2004 17:28:13 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.193.203.32] by sunsite.dk (MessageWall 1.0.8) with SMTP; 19 Feb 2004 17:28:13 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i1JHS4e06354; Thu, 19 Feb 2004 18:28:04 +0100 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1Atrxj-0000lq-00>; Thu, 19 Feb 2004 18:27:47 +0100 Date: Thu, 19 Feb 2004 18:27:47 +0100 From: DervishD To: Bart Schaefer Cc: Zsh Users Subject: Re: Can this be done with an array parameter? Message-ID: <20040219172747.GC2941@DervishD> Mail-Followup-To: Bart Schaefer , Zsh Users References: <20040219164631.GB2804@DervishD> <1040219171644.ZM14255@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1040219171644.ZM14255@candle.brasslantern.com> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi Bart :) * Bart Schaefer dixit: > } Zsh is reading my mind or so. Can anybody explain? > I note that PWS didn't bother to explain. :-) Well, he gave me the solution for the assignment without a loop ;) > Unless the SH_WORD_SPLIT option is set, variable references like $info > and $line aren't exactly quoted, but they aren't split up at spaces > either. $info is an array, so it acts (almost) like "${info[@]}", but > $line is a scalar, so it acts (almost) like "$line". Oh, yes, I forgot about that. I simply assumed that, since array values are space separated by default, the contents of the variables were too. I didn't remember about word splitting O:) Thanks a lot for the explanation, Bart ;) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/