I have two shell scripts:
First : 1.sh
, it reads as follows:
export PROP="my val"
Second : 2.sh
, it reads as follows:
./1.sh
echo $PROP
Both have execute permission. When I run 2.sh
, I am expecting that environment variable PROP
set and exported by 1.sh
, is visible to echo $PROP
statement in 2.sh
and would get printed. But output is blank indicating that PROP is not visible to 2.sh
. What is wrong here?