mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-25 23:03:09 +02:00
29 lines
286 B
Plaintext
29 lines
286 B
Plaintext
f()
|
|
{
|
|
local str=F
|
|
g str
|
|
}
|
|
|
|
g()
|
|
{
|
|
local -n ref=$1
|
|
printf "%s " "$ref"
|
|
ref=G
|
|
}
|
|
|
|
str=OUTSIDE;
|
|
f
|
|
|
|
printf "%s\n" "$str"
|
|
|
|
unset -f f g
|
|
unset str
|
|
|
|
f() { local -a arr=(F); g arr; };
|
|
|
|
g() { local -n ref=$1; printf "%s " "${ref[0]}"; ref=(G); };
|
|
|
|
arr=(OUTSIDE);
|
|
f;
|
|
printf "%s\n" "${arr[0]}"
|