From: Erik Veenstra Date: 2008-09-18T04:32:07+09:00 Subject: Re: Getting Ruby to output a windows command to text (log) file. See http://www.ruby-doc.org/core/classes/Kernel.html#M006001 : `cmd` => string Returns the standard output of running cmd in a subshell. The built-in syntax %x{…} uses this method. Sets $? to the process status. `date` #=> "Wed Apr 9 08:56:30 CDT 2003\n" `ls testdir`.split[1] #=> "main.rb" `echo oops && exit 99` #=> "oops\n" $?.exitstatus #=> 99 gegroet, Erik V.