hush/shell/hush_test/hush-misc/func_local2.tests

8 lines
126 B
Plaintext
Raw Normal View History

x=1
f() { echo $x; local x=$((x+1)); echo $x; }
g() { f; echo $x; f; local x=$((x+1)); f; echo $x; f; }
f
g
echo $x
echo Done