ash: make "locak VAR" unset VAR (bash does that)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2014-03-16 18:41:11 +01:00
parent 438b4ac286
commit 109ee5d336
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
a=A
f() {
local a
# the above line unsets $a
echo "A2:'$a'"
unset a
echo "A3:'$a'"
}
echo "A1:'$a'"
f
echo "A4:'$a'"