help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] indirection


From: Stephane Chazelas
Subject: Re: [Help-bash] indirection
Date: Wed, 14 Mar 2012 20:13:59 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

2012-03-14 13:48:25 -0600, Bill Gradwohl:
> If one level of indirection is ${!xxx}, how does one code 2 levels without
> using an intermediate variable?
> 
> Is it even possible?
> 
> I've tried and get nothing but bad substitution messages.
> 
> It's the syntax that's got me stumped.
[...]

Contrary to zsh, bash (and ksh) doesn't have a consistent syntax
for nesting expansion operators.

In zsh:

~$ a=b b=c c=d
~$ echo ${(P)a}
c
~$ echo ${(P)${(P)a}}
d

-- 
Stephane




reply via email to

[Prev in Thread] Current Thread [Next in Thread]