(1) Source code
#! /bin/bash
reference ()
{
pa=$"$1"
echo $pa
x=`eval "expr $pa "`
echo $1=$x
local aaa=$x
bbb=$x
eval "$1='test been modified'"
return 1
}
param="test"
echo $param " is test"
reference param
return_value=$?
echo "return value is " $return_value
echo $param " is not test"
return_value=$?
echo "return value is " $return_value
echo "aaa = "$aaa
echo "bbb = "$bbb
(2)###############OUT PUT ###############
root@sct-x42-05:/export/home/she_file# ./reference.ksh
test is test
$param
param=test
return value is 1
test been modified is not test
return value is 0
aaa =
bbb = test