O hack é usar eval
:
aaa=1
aab=2
aac=3
eval_like() {
pattern=$1
vars='set |grep "^$pattern.*=" | cut -f 1 -d '=''
for v in $vars; do
eval vval="\$$v"
echo $vval
done
}
for i in 'eval_like aa'; do
echo $i
done