你可以用()来新开启一个sub-shell,这样子就不会影响当前的shell了,例如:
[cactier@localhost ~]$ (declare -r sum1=defecho $sum1)def
[cactier@localhost ~]$ echo $sum1
[cactier@localhost ~]$
欢迎分享,转载请注明来源:内存溢出
你可以用()来新开启一个sub-shell,这样子就不会影响当前的shell了,例如:
[cactier@localhost ~]$ (declare -r sum1=defecho $sum1)def
[cactier@localhost ~]$ echo $sum1
[cactier@localhost ~]$
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)