Possible Duplicate:
Can ${var} parameter expansion expressions be nested in bash?
Is it possible to nest the shell parameter expansion (${})?
If I want to do something like this:
foo=( 1 2 3 4 5 )
echo ${${foo[@]/3/bar}:1}
Possible Duplicate:
Can ${var} parameter expansion expressions be nested in bash?
Is it possible to nest the shell parameter expansion (${})?
If I want to do something like this:
foo=( 1 2 3 4 5 )
echo ${${foo[@]/3/bar}:1}