update
This commit is contained in:
16
test.sh
16
test.sh
@@ -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
|
||||
Reference in New Issue
Block a user