Update test.sh

This commit is contained in:
2019-01-31 23:49:50 -06:00
parent 0a54b663e7
commit 0f93379d06

14
test.sh
View File

@@ -21,11 +21,15 @@ fi
function myfunc()
{
local -n __resultvar="$1" || return 1
__resultvar[*]="a"
__resultvar[*]="b"
__resultvar[*]="c"
__resultvar[*]="d"
__resultvar[*]="e"
__resultvar[0]="a"
__resultvar[1]="b"
echo 'yes';
if [ -f /etc/debian_version ] ; then
__resultvar[2]="c"
__resultvar[3]="d"
__resultvar[4]="e"
fi
echo "ok"
}
# call function that constructs the array with the array name