shell编程(五)变量

2019-06-22  本文已影响0人  zhangxiaohao
变量分类
定义变量

变量名=值

取变量

$变量名

取消变量

unset 变量

定义全局变量

export name='tttdd'

定义永久变量

本地变量
[root@www ~]# tail -1 ~/.bash_profile
name='baism'

全局变量
[root@www ~]# tail -1 /etc/profile
export age=30

上一篇 下一篇

猜你喜欢

热点阅读