# 写日志函数
function write_log()
{now_time='['$(date +"%Y-%m-%d %H:%M:%S")']'
echo ${now_time} $1 | tee -a ${log_file}
}
write_log '####################################################'
write_log 'Install started' 'The log is writed to '${log_file}
write_log '####################################################'
#去空格函数
function trim()
{
echo "$1" | grep -o "[^ ]\+\( \+[^ ]\+\)*"
}
#取参数函数
function get_parameter()
{
local key="$1"
local file_name="$2"
local value=
local line_num=
line_num&