Next: , Up: Environment variables


A.4.1 Environment substitutions

Much of the power of environment variables lies in the way that they may be substituted into configuration files. Variable substitutions are described below.

The line is scanned from left to right. In this scan, all characters other than dollar signs (‘$’) are retained without change. Dollar signs introduce environment variable references. References take three forms:

$var
Replaced by the value of environment variable var. var must consist of either one or more letters, or exactly one non-alphabetic character other than a left brace (‘{’).
${var}
Same as above, but var may contain any character (except ‘}’).
$$
Replaced by a single dollar sign.

Undefined variables expand to a empty value.