- 论坛徽章:
- 0
|
#!/bin/bash
#init env
init_variable()
{
deployer_file=/opt/oracle/sor/deploy/deploycontrol/conf/deployer.conf
}
#get deployer info
get_deployerinfo()
{
for deployer in $(cat ${deployer_file} |grep -v ^# |sort|uniq)
do
local tel=`echo ${deployer} | awk -F "," '{print $2}' `
local name=`echo ${deployer}| awk -F "," '{print $1}'`
echo "tel1=$tel==============name1=$name"
done
}
#test
test()
{
get_deployerinfo
echo "tel2=$tel name2=$name"
}
main()
{
#init env
init_variable
test
}
main
请教高手: 我想问的是for 循环体外test方法里的"tel2=$tel name2=$name"这两个值如果获取????? |
|