|GNU Bash Reference Manual|
by Chet Ramey and Brian Fox
Paperback (6"x9"), 180 pages
RRP £19.95 ($29.95)
"An essential resource .... the most detailed coverage available for all aspects of Bash" --- Linux User and Developer Magazine (Issue 37, Mar 2004) Get a printed copy>>>
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, variable, and 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 parameter, variable, and arithmetic 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) and
(see section 6.7 Arrays).
After all expansions,
quote removal (see section 3.5.9 Quote Removal)
|ISBN 0954161777||GNU Bash Reference Manual||See the print edition|