V
Victor Reyes
[Note: parts of this message were removed to make it a legal post.]
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
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