I have one script named a.sh from where I'm calling b.sh and passing some parameters from a.sh to b.sh . After b.sh is completed I'm exporting some variables from b.sh and I want to echo it from a.sh . I'm using export command in b.sh but I when I'm doing an echo command It is not showing anything in a.sh .
#b.sh
x=1
#some function is there
export $x
#a.sh
sh b.sh
echo "X value is : $x"
#output
# X value is :