I\'d like to change the pwd of the current shell from within a ruby script. So:
> pwd /tmp > ruby cdscript.rb > pwd /usr/bin
This
Dir.chdir("/usr/bin") will change the pwd within the ruby script, but that won't change the shell's PWD as the script is executed in a child process.
Dir.chdir("/usr/bin")