i understand that using system returns a boolean. but how can i get the
actual output from the system command?
···
--
Posted via http://www.ruby-forum.com/.
i understand that using system returns a boolean. but how can i get the
actual output from the system command?
--
Posted via http://www.ruby-forum.com/.
Pavel Pvl wrote:
i understand that using system returns a boolean. but how can i get the
actual output from the system command?
Use backticks.
output = `command`
--
RMagick: http://rmagick.rubyforge.org/
Tim Hunter wrote:
Pavel Pvl wrote:
i understand that using system returns a boolean. but how can i get the
actual output from the system command?Use backticks.
output = `command`
well the thing is that when using system, the output is a boolean bc it
returns whether the system command executed successfully
--
Posted via http://www.ruby-forum.com/\.
stdout = `#{ command }`
status = $?.exitstatus
for more try
gem install session
gem install open4
etc.
On Dec 22, 2007, at 9:09 PM, Pavel Pvl wrote:
well the thing is that when using system, the output is a boolean bc it
returns whether the system command executed successfully
--
share your knowledge. it's a way to achieve immortality.
h.h. the 14th dalai lama
Pavel Pvl wrote:
well the thing is that when using system, the output is a boolean [...]
DON'T use system. Use backticks.
--
Jabber: sepp2k@jabber.org
ICQ: 205544826
ara.t.howard wrote:
On Dec 22, 2007, at 9:09 PM, Pavel Pvl wrote:
well the thing is that when using system, the output is a boolean
bc it
returns whether the system command executed successfullystdout = `#{ command }`
status = $?.exitstatusfor more try
gem install session
gem install open4etc.
other way around (unless im wrong). i want the output rather then the
exit status. i tried this out but it still gave me only the exti status
--
Posted via http://www.ruby-forum.com/\.
Sebastian Hungerecker wrote:
Pavel Pvl wrote:
well the thing is that when using system, the output is a boolean [...]
DON'T use system. Use backticks.
i finally realized that a backtick is a `. sorry amd thank you very
much
--
Posted via http://www.ruby-forum.com/\.