15 lines
149 B
Text
15 lines
149 B
Text
![]() |
# declare -g added in bash-4.2
|
||
|
f=4
|
||
|
|
||
|
foo()
|
||
|
{
|
||
|
declare -g f=8
|
||
|
declare -g bar=4
|
||
|
|
||
|
echo inside
|
||
|
}
|
||
|
|
||
|
echo before: f = $f
|
||
|
foo
|
||
|
echo after: f = $f bar = $bar
|