Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Solved, but now a new twist (was: Double Evaluation Question (not in FAQ))
- X-seq: zsh-users 10672
- From: "Com MN PG P E B Consultant 3" <mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx>
- To: "zsh-users Mailinglist" <zsh-users@xxxxxxxxxx>
- Subject: Solved, but now a new twist (was: Double Evaluation Question (not in FAQ))
- Date: Mon, 4 Sep 2006 10:43:01 +0200
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Thread-index: AcbP6eqAy/Ln+XNuRGC5wbMkh0YCAwAEzouQ
- Thread-topic: Solved, but now a new twist (was: Double Evaluation Question (not in FAQ))
> 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"?
Sorry, I should have read the man page in better detail before
posting this question. The solution is of course
${(e)z}
But now comes another twist to this problem: I found that I *also*
would like to have the resulting string to undergo tilde-expansion,
which is of course a completely different story.
That is, if I have an assignment
x='~linus ~steve'
Is there also a simple solution, which expands $x to the home
directories
of linus and steve, with spacing preserved?
Ronald
--
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author