Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Build a variable name from another variable?



Quoting Philippe Troin <phil@xxxxxxxx> on Fri, Jan 23 15:19:
>
> % t="${baz}contents"   
> % echo ${${(P)t}}
> bar contents
> 
> Works...
> i could not manage to do it without an intermediate variable.

Ah, this will probably work for me.

Quoting Cosmo <cosmo@xxxxxxxxxx> on Fri, Jan 23 23:47:
>
> Back in the old days, before these fancy complicated shells, I'd just do 
> this:

I simplified a bit for the example, I'm actually trying to do stuff
much more complicated than just a echo...

Thanks,
   Omen

-- 
Where do forest rangers go to "get away from it all"?

Attachment: pgpvv0bzqOiYB.pgp
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author