diff --git a/test.sh b/test.sh index 6571369..83b025c 100755 --- a/test.sh +++ b/test.sh @@ -20,15 +20,15 @@ fi function myfunc() { - local -n myresult="$1" || return 1 - myresult[0]="a" - myresult[1]="b" + local -n __resultvar="$1" || return 1 + __resultvar[0]="a" + __resultvar[1]="b" echo 'yes'; if [ -f /etc/debian_version ] ; then - myresult[2]="c" - myresult[3]="d" - myresult[4]="e" -fi + __resultvar[2]="c" + __resultvar[3]="d" + __resultvar[4]="e" + fi echo "ok" }