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}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I know, it is not possible to nest shell parameter expansion. I’m afraid you’ll have to figure out another way of achieving what you need. If you post the code, maybe we can help you.