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

Re: simple substitution?



On Wednesday 12 of August 2009 15:39:16 tartifola@xxxxxxxxx wrote:
> Hi,
> I'm trying to understand expansion end substitution and I'm lost in
> what should be a simple substitution. Here my example
>
> >foo=4
> >echo ${foo}
>
> 4
>
> >FO=fo
> >O=o
> >echo \${${FO}${O}}
>
> ${foo}
>

Try

echo ${(P)${:-${FO}${O}}}

Recursive expansion never was a simple thing :)

Attachment: signature.asc
Description: This is a digitally signed message part.



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