2023-12-29 13:07:58 +00:00
|
|
|
# export
|
|
|
|
|
common/*: update pages of some POSIX special built-in utilities (#11956)
* exec, export, readonly, set, shift, trap: replace command descriptions
* exec, exit, export, readonly, set, shift, trap, exec, export: replace example descriptions
* exec, trap: replace "More information" links
* trap: remove prefix "SIG" from some command arguments
Although POSIX allows implementations to specify signal names without
the prefix "SIG", I will choose the most portable form.
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exit: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* readonly: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* shift: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* trap: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: explain environment of child process
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
---------
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
2024-01-07 22:38:34 +00:00
|
|
|
> Export shell variables to child processes.
|
2023-12-29 13:07:58 +00:00
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-export>.
|
|
|
|
|
common/*: update pages of some POSIX special built-in utilities (#11956)
* exec, export, readonly, set, shift, trap: replace command descriptions
* exec, exit, export, readonly, set, shift, trap, exec, export: replace example descriptions
* exec, trap: replace "More information" links
* trap: remove prefix "SIG" from some command arguments
Although POSIX allows implementations to specify signal names without
the prefix "SIG", I will choose the most portable form.
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exit: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* readonly: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* shift: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* trap: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: explain environment of child process
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
---------
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
2024-01-07 22:38:34 +00:00
|
|
|
- Set an environment variable:
|
2023-12-29 13:07:58 +00:00
|
|
|
|
|
|
|
`export {{VARIABLE}}={{value}}`
|
|
|
|
|
common/*: update pages of some POSIX special built-in utilities (#11956)
* exec, export, readonly, set, shift, trap: replace command descriptions
* exec, exit, export, readonly, set, shift, trap, exec, export: replace example descriptions
* exec, trap: replace "More information" links
* trap: remove prefix "SIG" from some command arguments
Although POSIX allows implementations to specify signal names without
the prefix "SIG", I will choose the most portable form.
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exit: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* readonly: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* shift: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* trap: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: explain environment of child process
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
---------
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
2024-01-07 22:38:34 +00:00
|
|
|
- Unset an environment variable:
|
2023-12-29 13:07:58 +00:00
|
|
|
|
|
|
|
`export -n {{VARIABLE}}`
|
|
|
|
|
common/*: update pages of some POSIX special built-in utilities (#11956)
* exec, export, readonly, set, shift, trap: replace command descriptions
* exec, exit, export, readonly, set, shift, trap, exec, export: replace example descriptions
* exec, trap: replace "More information" links
* trap: remove prefix "SIG" from some command arguments
Although POSIX allows implementations to specify signal names without
the prefix "SIG", I will choose the most portable form.
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exit: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* readonly: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* shift: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* trap: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: explain environment of child process
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
---------
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
2024-01-07 22:38:34 +00:00
|
|
|
- Export a function to child processes:
|
2023-12-29 13:07:58 +00:00
|
|
|
|
|
|
|
`export -f {{FUNCTION_NAME}}`
|
|
|
|
|
common/*: update pages of some POSIX special built-in utilities (#11956)
* exec, export, readonly, set, shift, trap: replace command descriptions
* exec, exit, export, readonly, set, shift, trap, exec, export: replace example descriptions
* exec, trap: replace "More information" links
* trap: remove prefix "SIG" from some command arguments
Although POSIX allows implementations to specify signal names without
the prefix "SIG", I will choose the most portable form.
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace term
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exit: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* export: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* readonly: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* set: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* shift: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* trap: replace Open Group link
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
* exec: explain environment of child process
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
---------
Co-authored-by: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com>
2024-01-07 22:38:34 +00:00
|
|
|
- Append a pathname to the environment variable `PATH`:
|
2023-12-29 13:07:58 +00:00
|
|
|
|
|
|
|
`export PATH=$PATH:{{path/to/append}}`
|
2024-04-18 05:30:49 +01:00
|
|
|
|
|
|
|
- Display a list of active exported variables in shell command form:
|
|
|
|
|
|
|
|
`export -p`
|