shell 获取一个变量指向的拎一个变量的值
#!/bin/bash
Ha=12345
Hb=asdf
name=a
p=`eval echo '$'H$name`
echo $p #12345
name=b
p=`eval echo '$'H$name`
echo $p #asdf
标签:shell,变量,echo,嵌套,eval,asdf,name
From: https://www.cnblogs.com/outsrkem/p/17382830.html
shell 获取一个变量指向的拎一个变量的值
#!/bin/bash
Ha=12345
Hb=asdf
name=a
p=`eval echo '$'H$name`
echo $p #12345
name=b
p=`eval echo '$'H$name`
echo $p #asdf
标签:shell,变量,echo,嵌套,eval,asdf,name
From: https://www.cnblogs.com/outsrkem/p/17382830.html