0

here are 2 example scripts:
script.sh:

#!/bin/bash
export TEST=1

script2.sh:

#!/bin/bash
./script.sh
echo $TEST

script.sh is supposed to assign 1 to the TEST variable and script2.sh is supposed to run script.sh to assign 1 to the TEST variable and then print the value of the TEST variable (1).

that doesn't work for some reason. there is no output, and if I run script.sh and then run echo $TEST it won't print anything - the variable is empty or nonexistent.

any idea why/how to do that properly?

thanks in advance!

0 Answers0