The "export" command copies a shell variable from the current script environment to that of the parent. The "export" operation copies variables up a single level. To export variables from nested scripts, a series of "export" commands would be required.
The "export" command should only be used from within scripts, and fails when typed directly on the command line.
EXAMPLES
#
# set the working directory and export the corresponding variable