Linux认证辅导:Linux Shell之export
export使在父shell中定义的环境变量在子shell中仍然有效。
eg:
- [Oracle@ora10g ~]$ echo $AA
- [oracle@ora10g ~]$ echo $BB
- [oracle@ora10g ~]$ AA=aaa
- [oracle@ora10g ~]$ BB=bbb
- [oracle@ora10g ~]$ export BB
- [oracle@ora10g ~]$ bash
- [oracle@ora10g ~]$ echo $AA
- [oracle@ora10g ~]$ echo $BB
- bbb
- [oracle@ora10g ~]$ exit
- exit
- [oracle@ora10g ~]$ echo $AA
- aaa
- [oracle@ora10g ~]$ echo $BB
- bbb
- [oracle@ora10g ~]$
相关推荐
tianhuak 2020-11-24
huha 2020-10-16
lianshaohua 2020-09-23
laisean 2020-11-11
zhangjie 2020-11-11
大牛牛 2020-10-30
firefaith 2020-10-30
liguojia 2020-10-20
wangzhaotongalex 2020-10-20
以梦为马不负韶华 2020-10-20
CARBON 2020-10-20
彼岸随笔 2020-10-20
lianshaohua 2020-10-20
yutou0 2020-10-17
JohnYork 2020-10-16
xiaonamylove 2020-10-16
Julyth 2020-10-16
applecarelte 2020-10-16
ourtimes 2020-10-16