Tell me more ×  I am scratching my head on this one, can't find
the bash reference talking about it.  In the code below   What
is the second line doing ? what does the !operator do in this
case ?  share|improve this question add comment  2 Answers  up
vote 5 down vote accepted  That is a short form for indirect
references.  $ foo=bar $ bar=bas $ echo ${!foo}  The seemingly
similar construction ${!foo*} expands to the names of all
variables whose name begin with foo:  $ foo1=x $ foo2=y $ echo
${!foo*} foo1 foo2 share|improve this answer You got it, thank
you. Now it makes complete sense, host_color=green, green is
another variable with the color code. –  Olivier Refalo Apr 25
'12 at 13:53 +1 Seems to be what @Oliver's code is doing -
basically setting host_color to the value of
${uphost}_host_color. No different from setting it to
${${uphost}_host_color}, right? –  Rob I Apr 25 '12 at 13:53 add
comment  From the bash manual:  If the first character of
parameter is an exclamation point (!), a level of variable