Making Environment Changes Stick in Ruby Scripting
Posted
by yar
on Stack Overflow
See other posts from Stack Overflow
or by yar
Published on 2010-04-04T04:02:14Z
Indexed on
2010/04/04
4:13 UTC
Read the original article
Hit count: 433
Here is my script
#!/usr/bin/env ruby
if __FILE__ == $0
`cd ..`
end
which runs fine, but when it exits, I'm back where I started. How can I "export" the changes I've made to the environment?
© Stack Overflow or respective owner