This is not a strictly Ruby question, but perhaps
you have some idea which could help me.

Recently I have written some some concise ruby scripts
which help me while working in the (bash) shell. (E.g.
x extracts any archive etc.)

I also wanted to write a more intelligent cd
(change sirectory) script in Ruby. Of course there is
an obvious problem I can't solve: the bash opens
a new shell for the script, so the working directory
remains unchanged in the shell.

I also tried to run ruby with

.. /usr/bin/ruby

I thought, it would run ruby in the current environment
(like ksh), but it simpy gives the error:

bash: ELF: command not found

Does someone have an idea, how could I change the
working directory by a Ruby script?

Regards, Christian