Exports are only for the current process and to child processes, it doesn’t go the other way. When the child shell (as.sh) exits, the setting disappears. In other words there is no “global” environment. That’s how it is in Unix/Linux.
So if you need to set something in the current shell, you need to source the file containing the setting. E.g.
Then the contents of as.sh are read in the current shell.
Perhaps you might want to read up on some Unix/Linux concepts. Search for the RUTE guide.
That only works for the script life time, you need to source it rather
than run it so it’s available to the shell your running. There are a
couple of ways to achieve this. either add to your export line
in ~/.bashrc file or source it direct;