About
variable expansion is an expansion that replaces a variable expression by its value.
Example
Prerequisite: We set the value of the variable foo to bar to perform the expansion
foo=bar
Example:
- In the following expression that is composed of:
- the echo command
- and a variable expression foo
echo ${foo}
- The variable expression foo will be replaced / expanded by the value bar at runtime resulting to
echo bar
that outputs to the console
bar