Bash - Export (Builtin command)
Table of Contents
1 - About
When declaring a variable, you can also export it with the
2 - Articles Related
3 - Syntax
export [-fn] [name[=word]] ... export -p
-f: the names refer to functions.
-pwill print a list of all names that are exported in this shell.
- The -n option causes the export property to be removed from each name.
=wordwill set the value of the variable to
4 - Return value
export returns an exit status of 0 unless:
- an invalid option is encountered,
- one of the names is not a valid shell variable name,
-fis supplied with a name that is not a function.