|
|
Brace expansions may be nested. The results of each expanded string are not sorted; left to right order is preserved. For example, a{\fPd,c,b}\fPe expands into `ade ace abe'.
Brace expansion is performed before any other expansions, and any characters special to other expansions are preserved in the result. It is strictly textual. Bash does not apply any syntactic interpretation to the context of the expansion or the text between the braces.
A correctly-formed brace expansion must contain unquoted opening and closing braces, and at least one unquoted comma. Any incorrectly formed brace expansion is left unchanged. A {\fP or ,\fP may be quoted with a backslash to prevent its being considered part of a brace expression. To avoid conflicts with parameter expansion, the string ${\fP is not considered eligible for brace expansion.
This construct is typically used as shorthand when the common prefix of the strings to be generated is longer than in the above example:
Web: http://shell.tjgy.com Email:support@tjgy.com