Variable (aka Parameter) Expansion
The $
character introduces parameter expansion, command substitution, or arithmetic expansion.
- The parameter name or symbol to be expanded can be enclosed in braces, which are optional but serve to protect the variable to be expanded from characters immediately following it which could be interpreted as part of the name.
Substitution
when we write ${parameter}
, the value of parameter
is substituted.