shell 配合 conf文件
当前目录
/
?
文件
/test.sh
/conf
?
/test.sh
文件内容
-- #!/bin/sh
-- . conf
-- echo $x
-- echo $y
?
/conf
文件内容
-- x=1
-- y=2
?
说明:
conf为配置文件
test.sh为执行文件
test.sh中执行conf文件 即 . conf
. 即 source
. 与配置文件conf之间有空格
?
配置与执行文件分离,降低耦合
?
?
发布时间: 2012-06-26 10:04:14 作者: rapoo
shell 配合 conf文件
当前目录
/
?
文件
/test.sh
/conf
?
/test.sh
文件内容
-- #!/bin/sh
-- . conf
-- echo $x
-- echo $y
?
/conf
文件内容
-- x=1
-- y=2
?
说明:
conf为配置文件
test.sh为执行文件
test.sh中执行conf文件 即 . conf
. 即 source
. 与配置文件conf之间有空格
?
配置与执行文件分离,降低耦合
?
?