标签:file eee lis style mod str size 组合 font
普通变量
name_A=James
name_B=Smith
name=`eval echo ‘$‘"name_$1"`
echo ${name}
测试:
#./filename.sh A
#./filename.sh B
数组
model_so=dummy.so
R_so_list=(
laaaR lsssR ldddR leeeR lrrrR
)
A_so_list=(
laaaA lsssA ldddA leeeA lrrrA
)
SO_LIST=`eval echo ‘$‘{"$1"_so_list[@]}`
for i in ${SO_LIST[@]}; do
echo lib${i:1}.so
done
测试:
#./filename.sh A
#./filename.sh R
标签:file eee lis style mod str size 组合 font
原文地址:http://www.cnblogs.com/jamesblue/p/7779474.html