shell 文件包含
. filename # 注意点号(.)和文件名中间有一空格
source filename
name.sh:
name="donny"
test.sh:
source ./name.sh # . ./name.sh
echo "My name is ${name}!"
shell 文件包含
. filename # 注意点号(.)和文件名中间有一空格
source filename
name.sh:
name="donny"
test.sh:
source ./name.sh # . ./name.sh
echo "My name is ${name}!"