mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 02:32:27 +02:00
commit bash-20120706 snapshot
This commit is contained in:
+7
-1
@@ -2,12 +2,18 @@
|
||||
bar=one
|
||||
typeset -n foo=bar
|
||||
|
||||
# normal unset unsets both nameref and variable it references
|
||||
# normal unset unsets only variable nameref references
|
||||
# need unset -n to unset nameref itself
|
||||
unset foo
|
||||
echo "expect <unset>"
|
||||
recho ${bar-unset}
|
||||
echo "expect <unset>"
|
||||
recho ${foo-unset}
|
||||
echo "expect <bar>"
|
||||
recho ${!foo}
|
||||
unset -n foo
|
||||
echo "expect <unset>"
|
||||
recho "${!foo-unset}"
|
||||
|
||||
readonly bar=two
|
||||
typeset -n foo=bar
|
||||
|
||||
Reference in New Issue
Block a user