I think this may be more of a unix question than a Ruby question...

If I create a test script:
  echo "echo hello world" > test_script

On "source" this from the unix command line:
  . ./test_script

...and I get the expected result.

I can also run it from the unix command line:
  chmod 755 ./test_script
  ./test_script

...again, I get the expected result.


However, if I now dive in to irb and try to run the script...
  irb(main):001:0> `./test_script`

It comes back with:
  (irb):1: command not found: ./test_script

However, if I ammend test_script by adding a sh'bang line at the start,
so that it now reads...
  #!/bin/sh
  echo hello world

And run it from irb, it will "do the right thing". :) I'm just wondering
why?!?!?!

Thankyou for any elucidation,
  Benjohn Barnes