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))



> 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