notes: add environment section

This commit is contained in:
Khaïs COLIN 2025-02-10 17:30:12 +01:00
parent a8ff648139
commit b10f2a2ec8
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo

View file

@ -439,6 +439,23 @@ execution environment.
A subshell is a copy of the shell process.
#### Environment
cf. 3.7.4 Environment
When a program is invoked it is given an array of strings called the
"environment". This is a list of name-value pairs, of the form 'name=value'.
Bash provides several ways to manipulate the environment. On invocation, the
shell scans its own environment and creates a parameter for each name found,
automatically marking it for 'export' to child processes. Executed commands
inherit the environment. The 'export' and 'unset' builtins allow parameters to
be added to and deleted from the environment. If the value of a parameter in
the environment is modified using the 'export' builtin, the new value becomes
part of the environment, replacing the old. The environment inherited by any
executed command consists of the shell's initial environment, whose values may
be modified in the shell, less any pairs removed by the 'unset' builtin, plus
any additions via the 'export' command.
## Here Documents
cf. Bash Reference Manual 3.6.6 Here Documents