* beginner needs help
@ 1996-05-27 22:00 Stefanita Valeriu Vilcu
1996-05-27 22:13 ` Zefram
1996-05-27 22:14 ` Zoltan Hidvegi
0 siblings, 2 replies; 3+ messages in thread
From: Stefanita Valeriu Vilcu @ 1996-05-27 22:00 UTC (permalink / raw)
To: zsh-workers
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.
In fact I'm trying to use arrays with multiple dimensions (if this is
possible).
Thank you for your help,
Stefanita
vsv@sfos.ro
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: beginner needs help
1996-05-27 22:00 beginner needs help Stefanita Valeriu Vilcu
@ 1996-05-27 22:13 ` Zefram
1996-05-27 22:14 ` Zoltan Hidvegi
1 sibling, 0 replies; 3+ messages in thread
From: Zefram @ 1996-05-27 22:13 UTC (permalink / raw)
To: Stefanita Valeriu Vilcu; +Cc: zsh-workers
>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.
eval FOO=\$$GIGI
$FOO is now somestuff.
-zefram
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: beginner needs help
1996-05-27 22:00 beginner needs help Stefanita Valeriu Vilcu
1996-05-27 22:13 ` Zefram
@ 1996-05-27 22:14 ` Zoltan Hidvegi
1 sibling, 0 replies; 3+ messages in thread
From: Zoltan Hidvegi @ 1996-05-27 22:14 UTC (permalink / raw)
To: Stefanita Valeriu Vilcu; +Cc: zsh-workers
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-05-27 23:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-27 22:00 beginner needs help Stefanita Valeriu Vilcu
1996-05-27 22:13 ` Zefram
1996-05-27 22:14 ` Zoltan Hidvegi
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).