# ==[ Command execution environment (EE)
#
# The shell has an execution environment that contains open files, current
# working directory, shell options, current traps set, and some other stuff
# that influence how commands are executed.
#
# Commands (except built-ins) are by default executed on a separate
# execution environment (a subshell) that is a separate process and that
# inherits part of the execution environment.
# 
# A command cannot modify the shell's EE because the command runs in a
# separate EE.
# You can modify the EE and mark some parameters to be inherited by
# subshells.
#
# When the shell runs a command in a subshell, it sets the variable '$_' to
# the full pathname of the command and passes it to the subshell's EE.
#
# Subshells are created for each command in a pipeline.
# They are also created by using parentheses around a (list of) command(s).
# Example: ( cd /tmp; ls ); pwd
# Example: foo=old; (foo=new); echo $foo
# 
# When commands are grouped together using curly braces, the group is
# executed in the same shell, not in a subshell.
# This is a bit faster and allows variable assignemnts to be seen outside
# the group.
# Also, redirections are applied to the entire group.
#
# Syntax: { cmd1; cmd2;}           # the semicolon is required
