Being dependent upon Cygwin, how how about putting the command in your saved file, e.g.:
echo "export PATH=$PATH" > dat Then sourcing the script later to set the path:
. ./dat Note that "sourcing" the script (vs. just executing it) is required for it to modify your current environment - and not just new child environments.