2 .bash_login只是针对iterm的吧,真正对环境变量起作用的是.bash_profile,当然一般.bash_profile也会加载.bashrc的内容,所以你也可以在.bashrc里面修改
ps: 这些应该是 shell的基本知识
var = "Value"str = "a test Value"
puts str.gsub( /#{var}/, 'foo' ) # =>"a test foo"
2 .bash_login只是针对iterm的吧,真正对环境变量起作用的是.bash_profile,当然一般.bash_profile也会加载.bashrc的内容,所以你也可以在.bashrc里面修改
ps: 这些应该是 shell的基本知识
var = "Value"str = "a test Value"
puts str.gsub( /#{var}/, 'foo' ) # =>"a test foo"