export
Set export attribute for shell variables.[1]
Documentation
- export [EN] @ GNU Bash Reference Manual
- bash -c 'help export'
- man 1 'bash' [EN]
Syntax
export -p
export [PARAMETER ...] [NAME[=VALUE] ...]
Parameters
- -p
- Display a list of all exported variables and functions.
Examples
- Define and export a variable in the same line
export EDITOR='/usr/bin/vim'
- Define and export a variable in two different lines
EDITOR='/usr/bin/vim'
export EDITOR
References
- ↑ bash -c 'help export'