I am scratching my head on this one, can’t find the bash reference talking about it.
In the code below
host_color=${uphost}_host_color
host_color=${!host_color}
What is the second line doing ? what does the !operator do in this case ?
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.
That is a short form for indirect references.
The seemingly similar construction ${!foo*} expands to the names of all variables whose name begin with foo: