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

export variable if the child shell wanted to inherit the environment variables of parent shell

2013-04-01 17:33 351 查看
case 1:

a=10

echo $a ;// yield to 10

bash // create one child shell

echo $a; // yield to nothing

case 2:

export a=10

echo $a // yield to 10

bash // create one child shell

echo $a // yield to 10
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐