#!/bin/bash
function test
{
$1_info="hello"
}
test a
echo $a_info
差不多想实现这个功能
function test() {
eval $1_info="hello";
}
# test a
# echo $a_info
hello
eval $1_info="hello";
}
# test a
# echo $a_info
hello
温馨提示:答案为网友推荐,仅供参考