DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

(bash.info) Shell Expansions

Info Catalog (bash.info) Shell Parameters (bash.info) Basic Shell Features (bash.info) Redirections
 
 3.5 Shell 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
 

Menu

 
* Brace Expansion             Expansion of expressions within braces.
* Tilde Expansion             Expansion of the ~ character.
* Shell Parameter Expansion   How Bash expands variables to their values.
* Command Substitution        Using the output of a command as an argument.
* Arithmetic Expansion        How to use arithmetic in shell expansions.
* Process Substitution        A way to write and read to and from a
 				command.
* Word Splitting      How the results of expansion are split into separate
 			arguments.
* Filename Expansion  A shorthand for specifying filenames matching patterns.
* Quote Removal       How and when quote characters are removed from
 			words.
 
    The order of expansions is: brace expansion; tilde expansion,
 parameter and variable expansion, 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 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 `"$@"' ( Special Parameters) and `"${NAME[@]}"'
 ( Arrays).
 
    After all expansions, `quote removal' ( Quote Removal) is
 performed.
 
Info Catalog (bash.info) Shell Parameters (bash.info) Basic Shell Features (bash.info) Redirections
automatically generated byinfo2html