I want to set an environment variable from a bash script that I wrote. So I created a bash script and called it
set.sh. Its content is as follows:
#!/bin/bash export DEV_SRC="/home/m/mydata/sourecCode" echo $DEV_SRC
When I run this script, the output is
But if I run this code on the same terminal that I ran the above script from,
I cannot see any value, so I think the value is not exported.
Why is the value not exported?