zsh: Command Substitution

Next: Arithmetic Expansion, Previous: Parameter Expansion, Up: Expansion [Contents][Index]

### 14.4 Command Substitution

A command enclosed in parentheses preceded by a dollar sign, like ‘`$(`...`)`’, or quoted with grave accents, like ‘```...```’, is replaced with its standard output, with any trailing newlines deleted. If the substitution is not enclosed in double quotes, the output is broken into words using the `IFS` parameter. The substitution ‘`$(cat` foo`)`’ may be replaced by the equivalent but faster ‘`$(<`foo`)`’. In either case, if the option `GLOB_SUBST` is set, the output is eligible for filename generation.