command executed and placed in the environment exported to that command.
When checking mail, this parameter holds the name of the mail file.
3.5 Shell Expansions
Expansion is performed on the command line after it has been split into tokens. There are seven kinds of expansion performed:
• brace expansion
• tilde expansion
• parameter and variable expansion
• command substitution
• arithmetic expansion
• word splitting
• filename expansion
The order of expansions is: brace expansion; tilde expansion, parameter and variable ex- pansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and filename expansion.
On systems that can support it, there is an additional expansion available: process substitution. This is performed at the same time as tilde, parameter, variable, and arith- metic expansion and command substitution.
Only brace expansion, word splitting, and filename expansion can change the number of words of the expansion; other expansions expand a single word to a single word. The only exceptions to this are the expansions of "$@" (see Section 3.4.2 [Special Parameters], page 20) and "${name[@]}" (see Section 6.7 [Arrays], page 89).
After all expansions, quote removal (see Section 3.5.9 [Quote Removal], page 31) is performed.
3.5.1 Brace Expansion
Brace expansion is a mechanism by which arbitrary strings may be generated. This mech- anism is similar to filename expansion (see Section 3.5.8 [Filename Expansion], page 30), but the filenames generated need not exist. Patterns to be brace expanded take the form of an optional preamble, followed by either a series of comma-separated strings or a sequence expression between a pair of braces, followed by an optional postscript. The preamble is prefixed to each string contained within the braces, and the postscript is then appended to each resulting string, expanding left to right.
Brace expansions may be nested. The results of each expanded string are not sorted; left to right order is preserved. For example, bash$ echo a{d,c,b}e ade ace abe
A sequence expression takes the form {x..y[..incr]}, where x and y are either integers or single characters, and incr, an optional increment, is an integer. When integers are supplied, the expression expands to each number between x and y, inclusive. Supplied integers may be prefixed with ‘0’ to force each term to have the same width. When either x or y begins with a zero, the shell attempts to force all generated terms to contain the