Copyright (C) 2000-2012 |
GNU Info (bashref.info)Shell ExpansionsShell Expansions ================ Expansion is performed on the command line after it has been split into `token's. 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 `"$@"' (Note: Special Parameters) and `"${NAME[@]}"' (Note: Arrays). After all expansions, `quote removal' (Note: Quote Removal) is performed. automatically generated by info2www version 1.2.2.9 |