Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
expansion of nested parameters
- X-seq: zsh-users 2743
- From: Phil Pennock <phil@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxxxxxx>
- Subject: expansion of nested parameters
- Date: Mon, 22 Nov 1999 19:02:25 +0000
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- Organisation: Organisation? Here? No, over there ---->
Hiya, quick question:
Not on list these days, please CC me in on replies - thanks.
This is with zsh-3.0.7:
-----------------------------< cut here >-------------------------------
#!/bin/zsh -f
a=foo
wib_foo_ble=Wow
c=\$wib_${a}_ble
print ${(e)c}
print ${(e)\$wib_${a}_ble}
-----------------------------< cut here >-------------------------------
1: Why does the second print statement print out the current process ID
from $$ instead of printing the same as the first print statement?
2: Is there a way to do this without using an intermediate variable, as
I've done with $c and without using eval statements?
For now, since the job needs doing, I'm using an intermediate, but the
perfectionist in me wants to know what I was doing wrong?
Or is the answer really obvious, and it's my fault for not using zsh so
heavily these days? :^)
Thanks folks,
--
--> Phil Pennock (!PP8185)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author