Table of Contents

Command Substitution

A command enclosed in parentheses preceded by a dollar sign, like so: $(...) or quoted with grave accents: `...` is replaced with its standard output. If the substitution is not enclosed in double quotes, the output is broken into words using the IFS parameter. The substitution $(cat foo) may be replaced by the equivalent but faster $(<foo). In either case, if the option GLOB_SUBST is set the output is eligible for filename generation.

Arithmetic Expansion

A string of the form $[exp] is substituted with the value of the arithmetic expression exp. See ARITHMETIC EVALUATION below.

Brace Expansion

A string of the form foo{xx,yy,zz}bar is expanded to the individual words fooxxbar, fooyybar, and foozzbar. Left-to-right order is preserved. This construct may be nested. Malformed brace expansion expressions, including expressions without a comma, are left unchanged by the shell.

An expression of the form {x-y}, where x and y are single characters, is expanded to every character between x and y, inclusive.


Mark D. Borges