Next: Parameters, Previous: Prompt Expansion, Up: Top [Contents][Index]
The following types of expansions are performed in the indicated order in five steps:
This is performed only in interactive shells.
Aliases are expanded immediately before the command line is parsed as explained in Aliasing.
These five are performed in one step in left-to-right fashion. After these expansions, all unquoted occurrences of the characters ‘\’, ‘'’ and ‘"’ are removed.
If the SH_FILE_EXPANSION option is set, the order of expansion is modified for compatibility with sh and ksh. In that case filename expansion is performed immediately after alias expansion, preceding the set of five expansions mentioned above.
This expansion, commonly referred to as globbing, is always done last.
The following sections explain the types of expansion in detail.
• History Expansion: | ||
• Process Substitution: | ||
• Parameter Expansion: | ||
• Command Substitution: | ||
• Arithmetic Expansion: | ||
• Brace Expansion: | ||
• Filename Expansion: | ||
• Filename Generation: |