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

Re: beginner needs help



> Hi!
> 
> How can I expand a variable which is in another variable?
> Let me explain:
> 
> zsh$ TITI=somestuff
> zsh$ GIGI=TITI  # NOT $TITI
> 
> What command I must enter in order to obtain "somestuff" and in this 
> command must not appear TITI.

You can try something like

eval echo '$'$GIGI

Or, after

GIGI='$TITI'

you can use ${(e)GIGI} with zsh-2.6-beta17 or later (see man zshexpn).

> In fact I'm trying to use arrays with multiple dimensions (if this is 
> possible).

No, only one dimensional arrays are supported.

Zoltan




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