Recursively expands environment variables in a string. Variables may be
presented with optional default as $VAR[:default] or ${VAR[:default]}.
Unknown variables will expand to an empty string.
The expansion is recursive. If a referenced variable itself contains
references, those will also be expanded until a stable value is reached.
Escaped references (e.g. \$FOO) are preserved as literals.
Recursively expands environment variables in a string. Variables may be presented with optional default as
$VAR[:default]
or${VAR[:default]}
. Unknown variables will expand to an empty string.