export

From RaySoft

Set export attribute for shell variables.[1]

Documentation

Syntax

export -p
export [PARAMETER ...] [NAME[=VALUE] ...]

Parameters

-f
Refer to shell functions.
-n
Remove the export property from each NAME.
-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

  1. bash -c 'help export'