How do I export an environment variable from within a Ruby script to the parent shell? For example, implementing a na?ve implementation of the read
Bash builtin:
#!/usr/bin/ruby
varname = ARGV[0]
ENV[varname] = STDIN.gets # but have varname exported to the parent process
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…