builtin
Bash export — pass variables to child programs
Marks names for inclusion in subsequently launched program environments. May assign a value at the same time. Child changes do not update the parent.
Formal Syntax & Structure
bash syntaxbash
export name[=value] ...Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name[=value] | string | Name with optional assignment. |
Return Value
exit status
Zero on success, nonzero for invalid name or option.
Working Example
Example Snippetbash
unset BM_THEMEBM_THEME=lightbash -c 'printf "%s\n" "${BM_THEME-unset}"'export BM_THEMEbash -c 'printf "%s\n" "$BM_THEME"'