mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
notes: add environment section
This commit is contained in:
parent
a8ff648139
commit
b10f2a2ec8
1 changed files with 17 additions and 0 deletions
17
NOTES.md
17
NOTES.md
|
|
@ -439,6 +439,23 @@ execution environment.
|
||||||
|
|
||||||
A subshell is a copy of the shell process.
|
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
|
## Here Documents
|
||||||
cf. Bash Reference Manual 3.6.6 Here Documents
|
cf. Bash Reference Manual 3.6.6 Here Documents
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue