What is the purpose of the bash built-in export command?

What is the purpose of the bash built-in export command

What is the purpose of the bash built-in export command

A.
To allow disks to be mounted remotely

B.
To run a command as a process in a sub-shell

C.
To make the command history available to sub-shells

D.
To setup environment variables for applications

E.
To share NFS partitions for use by other systems on the network

Explanation/Reference:
From the man pages:
export -p    The supplied names are marked for automatic export to the environment  of  subsequently  executed  commands.   If  the -f option is given, the names refer to functions.  If no names are given, or if the -p option is supplied, a list of all names that are exported in this shell  is  printed.   The  -n  option causes  the export property to be removed from each name.  If a variable name is followed by =word, the value of the variable is set to word.



Leave a Reply 0

Your email address will not be published. Required fields are marked *