当一个脚本需要读取外部的配置信息时。
1.创建配置文件xx.config,并编写配置信息
testConfig.config
2.编写shell脚本
使用source将配置文件读入
输出的结果:hello world
当一个脚本需要读取外部的配置信息时。
1.创建配置文件xx.config,并编写配置信息
testConfig.config
2.编写shell脚本
使用source将配置文件读入
输出的结果:hello world
转载于:https://my.oschina.net/u/3399692/blog/1819555