Bash - Export (Builtin command)

Bash Liste Des Attaques Ovh

About

The supplied names (variable or function) are marked for automatic export to the environment of subsequently executed commands.

They are made available to all other command execution (script, …). You can see them with the env command.

When declaring a variable, you can also export it with the x option

Syntax

export [-fn] [name[=word]] ...
export -p
  • -f: the names refer to functions.
  • -p will 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.
  • =word will set the value of the variable to word

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,
  • or -f is supplied with a name that is not a function.

Documentation / Reference





Discover More
Bash Liste Des Attaques Ovh
Bash - (Environment) Variable

A variable is a parameters referenced by a name. parameter A variable has: a value and zero or more attributes (such as integer, ...). Attributes are assigned using the declare builtin command....
Bash Liste Des Attaques Ovh
Bash - Builtin Commands

builtin refers to: a builtin command. See or to the specific builtin command. See (useful when defining a function whose name is the same as a shell builtin) The builtin command execute the specified...
Bash Liste Des Attaques Ovh
Bash - Declare (Variable declaration and attribute)

Declare variables and/or give them attributes. where: names: If no names are given then display the values of variables. p will display the attributes and values of each name. When -p is used,...
Bash Liste Des Attaques Ovh
Bash - Env - (Process Execution Environment and builtin command)

context execution in bash. To send a variable or a function to another sub-process environment, you use the export command.
Bash Liste Des Attaques Ovh
Bash - Function

A shell function is an object that: is called like a simple command and executes a compound command with a new set of positional parameters. ie a function definition is itself a compound command ...
Bash Liste Des Attaques Ovh
Bash - Scope

A name variable or function is scoped in Bash: by the subshell with the export built-in command with the source built-in command with the local declaration
Bash Liste Des Attaques Ovh
Bash - Set (of Bash Options)

The set builtin command can be specify shell option. When options are specified, they set or unset shell attributes. Without options, the name and value of each shell variable are displayed in a...
Bash Liste Des Attaques Ovh
Bash - process

This article is the bash Process. To see how to manage another general linux process, see The process running the command is created. The process inherits the stdin, stdout, and stderr from...



Share this page:
Follow us:
Task Runner