From: Victor Reyes Date: 2008-07-22T03:35:33+09:00 Subject: How to invoke an external program and get anything the pgm returns back ------=_Part_33146_11506182.1216665661561 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Team, I have a Ruby script which might invoke an external program. The external program could be written in: Ruby, Perl, KSH, CSH, BSH, Etc. The invoked program might return a value in the the form of a return code. For example, a KSH script might execute an *exit 99* stmt and which value I would like to capture in the invoker, Ruby script. I tried: Ruby script segment: rc = `/usr/local/bin/script_name` I also tried in the Ruby caller script: system("/usr/local/bin/script_name") KSH: exit 99 But *rc* does not have anything of value. It has either *true* or *false*. ======================== Also, using Ruby to Ruby I still can't get a Ruby script called another Ruby script, have the called script returns a value and have the invoker Ruby script get the value. Is there anyway to get what I described above? Thank you Victor ------=_Part_33146_11506182.1216665661561--