Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can this be done with an array parameter?
- X-seq: zsh-users 7066
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Can this be done with an array parameter?
- Date: Thu, 19 Feb 2004 18:27:47 +0100
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1040219171644.ZM14255@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20040219164631.GB2804@DervishD> <1040219171644.ZM14255@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author