Each command in a pipeline is executed as a separate process (i.e., in a subshell).
When a simple command other than a builtin or shell function is to be executed, it is invoked in a
separate execution environment that consists of the following. Unless otherwise noted, the values are
inherited from the shell.
A child shell is also called subshell
When you give the shell a command associated with a compiled executable or shell script, the shell
creates, or forks, a new process called a subshell.
To execute most built-in commands, the shell forks a subshell which executes the command directly (no
exec system call). For the built-in commands cd, set, alias and source, the current shell executes the
command; no subshell is forked.