2009-04-20 10:52:31 +00:00
|
|
|
var=old
|
|
|
|
f() { echo "var=$var"; }
|
2017-07-24 18:51:40 +02:00
|
|
|
# bash: POSIXLY_CORRECT behavior is to "leak" new variable values
|
|
|
|
# out of function invocations (similar to "special builtins" behavior);
|
|
|
|
# but in "bash mode", they don't leak.
|
|
|
|
# hush does not "leak" values. ash does.
|
2009-04-20 10:52:31 +00:00
|
|
|
var=val f
|
|
|
|
echo "var=$var"
|