parameter-expansion
Bash ${name} — basic parameter expansion
Expands a named variable; braces delimit its name. Double-quote the expansion to preserve a single argument in ordinary command contexts. Unset values normally expand to empty when nounset is disabled.
Formal Syntax & Structure
bash syntaxbash
${name}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Variable or parameter name. |
Return Value
string
Expanded parameter value.
Working Example
Example Snippetbash
file='report'printf '%s\n' "${file}.txt" "${file}_old"