It varies by shell, but basically the set command is used to define a variable for the current shell. The export command is used to define the variable as one that subshells (shells spawned from the original) should inherit.
linux shell set vs export
最新推荐文章于 2024-07-16 14:40:54 发布
本文讲解了在Shell环境中如何使用set命令定义当前Shell的变量,以及如何通过export命令使子Shell能够继承这些变量。这对于理解Shell脚本中变量的作用域和传递至关重要。
638

被折叠的 条评论
为什么被折叠?



