
export variables to calling shell in a shell-script
You can't do it; a shell script cannot effect the environment of a parent.
The 'export' command actually is in the opposite direction to what you
want, marking a variable for export means that the variable will be copied
as part of the default environment for any _child_ shell run.
The only way you can solve this problem directly is to "source" the
script (ie: execute it within the current shell process).
In ksh/bash/sh you want the "." built-in command (man sh),
in csh it's "source".
L