This commit is contained in:
2019-01-31 23:39:52 -06:00
parent 12ebc376a4
commit 45a8c9ebe9
2 changed files with 14 additions and 4 deletions

16
test.sh
View File

@@ -18,6 +18,18 @@ fi
detect_os OS
function myfunc()
{
local -n myresult="$1" || return 1
myresult[0]="a"
myresult[1]="b"
myresult[2]="c"
myresult[3]="d"
myresult[4]="e"
}
# call function that constructs the array with the array name
myfunc targetvalue
# display it
declare -p targetvalue
echo $OS