parameter expansion

Replacing a dollar sign and a variable name with the variable's value, optionally transformed by an operator inside curly braces.

In more detail

Plain $name is the simplest form; ${name} marks where the name ends. Operators inside the braces supply defaults, lengths, slices, trimming, replacement and case changes without starting any other program. The result is still subject to word splitting and globbing unless the expansion is in double quotes.

Example

echo "${name}_backup"

Related terms

Taught in

References