This question already has an answer here:
I'm trying to have a bash script create a variable and have the variable persist in the terminal until the terminal closes (not permanently). I thought
export was what I needed but it didn't work.
#!/bin/bash export VARIABLE='this is a test'
Then run the script:
Then in the same terminal:
$ echo "$VARIABLE"
But it produces a blank response.