zsh-users
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <Stephane_Chazelas@yahoo.fr>
To: zsh-users Mailinglist <zsh-users@sunsite.dk>
Subject: Re: Double Evaluation Question (not in FAQ)
Date: Mon, 4 Sep 2006 07:28:02 +0100	[thread overview]
Message-ID: <20060904062802.GA4039@sc> (raw)
In-Reply-To: <F7507090F1A72B43A51444325DFBE431011F293C@MCHP7R6A.ww002.siemens.net>

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


      reply	other threads:[~2006-09-04  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-04  6:18 Com MN PG P E B Consultant 3
2006-09-04  6:28 ` Stephane Chazelas [this message]

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=20060904062802.GA4039@sc \
    --to=stephane_chazelas@yahoo.fr \
    --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).