shell source命令
功能:在当前shell环境执行脚本,修改当前shell环境变量生效
sh test.sh会新建shell环境执行脚本,修改变量不会再当前shell环境生效
. test.sh/source test.sh会在当前环境执行,修改变量在当前shell生效
Please call me JiangYouDang!
功能:在当前shell环境执行脚本,修改当前shell环境变量生效
sh test.sh会新建shell环境执行脚本,修改变量不会再当前shell环境生效
. test.sh/source test.sh会在当前环境执行,修改变量在当前shell生效