您的位置:首页 > 运维架构 > Shell

Linux 下 SHELL的几种执行方式

2013-04-02 14:01 211 查看
zxin10@appshopwap2:~/temp> cat test.sh
export ABC=AABBCC


1,当前shell进程下执行。

1.1 . ./test.sh

1.2 source test.sh

执行结果后检查环境变量:

echo $ABC,结果为空。

2,当前shell进程开一个子shell进程执行。

2.1 .test.sh

2.2 bash test.sh

执行结果后检查环境变量:

echo $ABC,结果为AABBCC。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: