0
非常感谢您提前帮助!Bash - 使用另一个变量回声变量(?)
我有这个变量:
scene1=lounge
scene2=bedroom
scene3=bathroom
我想要做的是一个循环,并在特定的文件夹中的所有文件,呼应了可变场景#
order=1
for f in $(find $dest_scenes/*.xml -maxdepth 0)
do
scene_name=scene$order #scene1, scene2, scene3
echo $scene_name
done
order=$(expr $order + 1)
输出:
scene1
scene2
scene3
我想要什么:
lounge
bedroom
bathroom
我不想让$ scene_name,我想拿到$($ scene_name),如果你知道我的意思......
谢谢!
另请参阅http://tldp.org/LDP/abs/html/ivr.html – thedrs
这正是我想要的!非常感谢你!!! – RafaelGP