touch test.sh
#!/bin/bash
WQW=nice
touch exec.sh
#!/bin/bash
source test.sh
echo $WQW
结果:nice
touch test.sh
#!/bin/bash
WQW=nice
touch exec.sh
#!/bin/bash
source test.sh
echo $WQW
结果:nice
转载于:https://www.cnblogs.com/wangqiwen-jer/p/10981915.html