Node:Expansion Stages, Next:Calling Wordexp, Up:Word Expansion
When word expansion is applied to a sequence of words, it performs the following transformations in the order shown here:
~foo
with the name of
the home directory of foo
.
$foo
.
`cat foo`
and
the equivalent $(cat foo)
are replaced with the output from
the inner command.
$(($x-1))
are
replaced with the result of the arithmetic computation.
*.c
with a list of .c
file names. Wildcard expansion applies to an
entire word at a time, and replaces that word with 0 or more file names
that are themselves words.
For the details of these transformations, and how to write the constructs that use them, see The BASH Manual (to appear).