注: 部分概念介绍来源于网络
配置文件内容如下config.properties:
name=li
age=20
shell脚本内容如下:
current_path=$(cd `dirname $0`;pwd)
echo $current_path
source $current_path/config.properties
echo $name
echo $age
注: 部分概念介绍来源于网络
配置文件内容如下config.properties:
name=li
age=20
shell脚本内容如下:
current_path=$(cd `dirname $0`;pwd)
echo $current_path
source $current_path/config.properties
echo $name
echo $age