2009-04-20 16:22:31 +05:30
|
|
|
var=old
|
|
|
|
f() { echo "var=$var"; }
|
2017-07-24 22:21:40 +05:30
|
|
|
# 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 16:22:31 +05:30
|
|
|
var=val f
|
|
|
|
echo "var=$var"
|