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:
$ ./test.sh
Then in the same terminal:
$ echo "$VARIABLE"
But it produces a blank response.
.sh
: User should not need to know the language, and the language can change.