Reputation: 198238
I see in a shell file, it has such code:
getValue ${!value}
You can see there is a !
before the varaible value
. I can't find document for this usage, what does it mean?
Upvotes: 1
Views: 575
Reputation: 23364
!
is used to dereference a variable, see example below:
abc=def
value=abc
echo ${!value}
def
See also Shell Parameter Expansion.
Upvotes: 2