Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 10
    This is also explicitly specified by POSIX. Commented May 9, 2018 at 6:36
  • 1
    Interestingly, under CentOS 7 the bash manpage doesn't mention any subshell: Bash performs the expansion by executing command and replacing the command substitution with the standard output of the command, with any trailing newlines deleted. I wonder if this was a deliberate omission. Commented May 9, 2018 at 6:55
  • 7
    @dr01 On the contrary, bash 4.4 changed the wording of that sentence to include the word “subshell”. It was a clarification: the manual explicitly mentioned that various other constructs were subshells, but until 4.4 it wasn't explicitly stated for command substitution. Commented May 9, 2018 at 8:17
  • Yep, on CentOS v7.4.1708 (fairly recent) bash is v4.2.46. Commented May 9, 2018 at 12:42