|
Global variables
are available to the shell where they are created and all subshells.
To make a variable global you can either list it in the initialization
files (that are read when the shell starts) or you can export the
variable.
Command
Format
VARIABLE=value;
export VARIABLE
unset
VARIABLE
Example
In
this example we will set and then export a variable name DATA:
$ DATA=/datafile; export DATA
$ echo $DATA
/datafile
|