一句话的linux

[huazi@huazi ~]$ echo $name
 
[huazi@huazi ~]$ name=tom
[huazi@huazi ~]$ echo $name
tom
[huazi@huazi ~]$ declare -r name
[huazi@huazi ~]$ echo $name
tom
[huazi@huazi ~]$ name=huazi
bash: name: readonly variable
[huazi@huazi ~]$ unset name
bash: unset: name: cannot unset: readonly variable
[huazi@huazi ~]$ 
目前是没有找到在当前shell和当前用户下删除或者取消只读变量的方法。
 

你可能感兴趣的:(只读变量)