projects
/
platform
/
upstream
/
bash.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git]
/
tests
/
varenv6.sub
1
f()
2
{
3
local str=F
4
g str
5
}
6
7
g()
8
{
9
local -n ref=$1
10
printf "%s " "$ref"
11
ref=G
12
}
13
14
str=OUTSIDE;
15
f
16
17
printf "%s\n" "$str"
18
19
unset -f f g
20
unset str
21
22
f() { local -a arr=(F); g arr; };
23
24
g() { local -n ref=$1; printf "%s " "${ref[0]}"; ref=(G); };
25
26
arr=(OUTSIDE);
27
f;
28
printf "%s\n" "${arr[0]}"