变量的取用与设置:echo

shell使用学习笔记1-变量的使用(echo,unset)

shell使用学习笔记1-变量的使用(echo,unset)

 

若该变量需要在其他子程序执行,则需要以 export 来使变量变成环境变量:
“export PATH”

 

 

变量设置规则:unset

取消变量的方法为使用 unset :“unset 变量名称”例如取消 myname 的设置:
“unset myname”

https://www.showapi.com/book/view/2089/88

 

例子:

shell使用学习笔记1-变量的使用(echo,unset)

shell使用学习笔记1-变量的使用(echo,unset)

shell使用学习笔记1-变量的使用(echo,unset)

环境变量=全域变量
自订变量=区域变量

相关文章:

  • 2021-10-30
  • 2021-05-20
  • 2021-11-15
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
猜你喜欢
  • 2021-09-05
  • 2021-06-04
  • 2021-05-26
  • 2021-06-21
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案