Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Double Evaluation Question (not in FAQ)
- X-seq: zsh-users 10671
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- Subject: Re: Double Evaluation Question (not in FAQ)
- Date: Mon, 4 Sep 2006 07:28:02 +0100
- In-reply-to: <F7507090F1A72B43A51444325DFBE431011F293C@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users Mailinglist <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <F7507090F1A72B43A51444325DFBE431011F293C@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
On Mon, Sep 04, 2006 at 08:18:19AM +0200, Com MN PG P E B Consultant 3 wrote:
> Assuming that variables are assigned in the following way:
>
> x=abc
> y=def
> z='$x $y' # Note: Single Quotes!
>
> How could I write an expression, which "evaluates" $z, in
> that it would return "abc def"? The simple
>
> eval "echo $z"
>
> would not work here, because it would not
> preserve the spaces.
[...]
print -r -- ${(e)z}
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author