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