I need to export an environmental variable to run a program. I am able to successfully do that in interactive mode. However, when I try to export an environmental variable as part of a bash shell script, I get this error message:
export: Command not found.
In interactive mode, when I type in the following command, it works.
export GT_DIR=/cluster/home/SD/
But when I include the export command as part of the shell script, it does not work. I.e.,
#!/bin/bash
export GT_DIR=/cluster/home/SD/
I get the error message:
export: Command not found.
When I type in echo $SHELL, I get
/bin/bash
Why is the export command working in interactive mode but not when I try to submit it as a script?