Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Build a variable name from another variable?
- X-seq: zsh-users 7016
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: Build a variable name from another variable?
- Date: Sat, 24 Jan 2004 02:36:45 +0000
- In-reply-to: <20040124005150.GA14079@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040123224220.GB3354@xxxxxxxxxxxxxxxxxxxxxxx> <4011B29F.8040304@xxxxxxxxxx> <87oesugsnb.fsf@xxxxxxxxxxxxxxxx> <20040124005150.GA14079@xxxxxxxxxxxxxxxxxxxxxxx>
On Jan 23, 7:51pm, Omen Wild wrote:
}
} 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.
Here it is without the intermediate variable:
${(P)${:-${baz}contents}}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author