---------- Forwarded message ----------
From: Edward Thornton <chair667board / gmail.com>
Date: Sun, May 15, 2011 at 4:48 AM
Subject: Using %X problem
To: ruby-core / ruby-lang.org


I have been having problems with a
very simple program.
-----------------------------------------
#!/usr/bin/ruby
#
puts "Begin Test"
puts %x{"ps -ef"}
puts "End Test"
----------------------------------------
Results on both CENTOS 4.5 and
UBUNTU 10.10 are as follows:

-----------------------------------------
hydra(KINGSTON}$ruby test.rb
Begin Test
sh: ps -ef: not found

End Test
hydra(KINGSTON}$
-----------------------------------------

Now 'ps -ef' works fine at the
command line -- But gets this
result from Ruby?

Oddly, the command  "ps" works
fine both from Ruby and Command
line.

I checked the SHELL Logical and it
was what I expected:

  SHELL=/bin/bash

Any clue what is going on here??

I thouht it was a OS problem but
the same thing happens on two
disimilar OS's.

   Chuck
   admin / hawthorne-press.com