Hi,

This question is rather out of curiosity than practical.

Let's say I want to make a script which is equivalent to cd command in
Linux.
Is it possible?

Usage:

~$ ruby mycd.rb /temp
/temp$          <- current dir has been changed after the script ran.


system("cd #{ARGV[0]}") didn't work.

Thanks.

Sam